@dndbuilder.com/react
Version:
Drag and drop builder for React
22 lines (21 loc) • 902 B
JavaScript
import { jsxs as s, Fragment as f, jsx as e } from "react/jsx-runtime";
import { ThemeConfiguration as a } from "../../config/theme.config.js";
import { BuilderConfiguration as g } from "../../config/builder.config.js";
import { generateBlockTree as p } from "../../utils/block.js";
import { RenderBlock as d } from "./render-block.js";
import { AssetManager as l } from "./asset-manager.js";
const R = ({ content: t, meta: i, builderConfig: o }) => {
o && g.mergeConfig(o);
const n = p("root", t).root;
return n ? /* @__PURE__ */ s(f, { children: [
/* @__PURE__ */ e("main", { children: n.children.map(
(r, m) => typeof r != "string" && /* @__PURE__ */ e(d, { index: m, block: r, meta: i }, r.id)
) }),
/* @__PURE__ */ e(l, { content: t, themeSettings: a.settings })
] }) : null;
};
export {
R as RenderContent,
R as default
};
//# sourceMappingURL=render-content.js.map