@botonic/plugin-flow-builder
Version:
Use Flow Builder to show your contents
20 lines • 669 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { Image } from '@botonic/react';
import { ContentFieldsBase } from './content-fields-base';
export class FlowImage extends 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 _jsx(Image, { src: this.src }, id);
}
}
//# sourceMappingURL=flow-image.js.map