UNPKG

@botonic/plugin-flow-builder

Version:

Use Flow Builder to show your contents

24 lines 857 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FlowImage = void 0; const jsx_runtime_1 = require("react/jsx-runtime"); const react_1 = require("@botonic/react"); const content_fields_base_1 = require("./content-fields-base"); class FlowImage extends content_fields_base_1.ContentFieldsBase { constructor() { super(...arguments); this.src = ''; this.code = ''; } static fromHubtypeCMS(component, locale) { const newImage = new FlowImage(component.id); newImage.code = component.code; newImage.src = this.getAssetByLocale(locale, component.content.image); return newImage; } toBotonic(id) { return (0, jsx_runtime_1.jsx)(react_1.Image, { src: this.src }, id); } } exports.FlowImage = FlowImage; //# sourceMappingURL=flow-image.js.map