UNPKG

@botonic/plugin-flow-builder

Version:

Use Flow Builder to show your contents

21 lines 850 B
import { jsx as _jsx } from "react/jsx-runtime"; import { Carousel } from '@botonic/react'; import { ContentFieldsBase } from './content-fields-base'; import { FlowElement } from './flow-element'; export class FlowCarousel extends ContentFieldsBase { constructor() { super(...arguments); this.code = ''; this.elements = []; } static fromHubtypeCMS(component, locale, cmsApi) { const newCarousel = new FlowCarousel(component.id); newCarousel.code = component.code; newCarousel.elements = component.content.elements.map(element => FlowElement.fromHubtypeCMS(element, locale, cmsApi)); return newCarousel; } toBotonic(id) { return (_jsx(Carousel, { children: this.elements.map(element => element.toBotonic(id)) }, id)); } } //# sourceMappingURL=flow-carousel.js.map