import * as React from "react"; import * as WebComponents from ".."; import { ComponentTypes } from "../types"; import { EditorMode } from "@sc/modules/v2/Editor/types"; interface StacksProps { mode?: EditorMode; data: any; globalStyle?: any; } interface IStackData { type: ComponentTypes; style?: any; html?: string | React.ReactNode; } export const Stacks: React.FC = ({ data = [], globalStyle }) => { return (
{data.map((itm: IStackData, key: number) => { const Component: any = WebComponents[itm.type]; return (
{itm.html}
); })}
); }; export default Stacks;