UNPKG

@botonic/plugin-flow-builder

Version:

Use Flow Builder to show your contents

27 lines 931 B
import { __awaiter } from "tslib"; import { jsx as _jsx } from "react/jsx-runtime"; import { Image } from '@botonic/react'; import { trackOneContent } from '../tracking'; import { ContentFieldsBase } from './content-fields-base'; export class FlowImage extends ContentFieldsBase { constructor() { super(...arguments); this.src = ''; } static fromHubtypeCMS(component, locale) { const newImage = new FlowImage(component.id); newImage.code = component.code; newImage.src = this.getAssetByLocale(locale, component.content.image); newImage.followUp = component.follow_up; return newImage; } trackFlow(request) { return __awaiter(this, void 0, void 0, function* () { yield trackOneContent(request, this); }); } toBotonic(id) { return _jsx(Image, { src: this.src }, id); } } //# sourceMappingURL=flow-image.js.map