@botonic/plugin-flow-builder
Version:
Use Flow Builder to show your contents
24 lines • 857 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.FlowVideo = 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 FlowVideo extends content_fields_base_1.ContentFieldsBase {
constructor() {
super(...arguments);
this.src = '';
this.code = '';
}
static fromHubtypeCMS(component, locale) {
const newVideo = new FlowVideo(component.id);
newVideo.code = component.code;
newVideo.src = this.getVideoByLocale(locale, component.content.video);
return newVideo;
}
toBotonic(id) {
return (0, jsx_runtime_1.jsx)(react_1.Video, { src: this.src }, id);
}
}
exports.FlowVideo = FlowVideo;
//# sourceMappingURL=flow-video.js.map