@ea-lab/reactive-json
Version:
A REACT-based lib that transforms JSON (or YAML) into interactive HTML markup.
20 lines (19 loc) • 681 B
JavaScript
import { jsx as e } from "react/jsx-runtime";
import { ActionDependant as c } from "../../../engine/Actions.js";
import { useEvaluatedAttributes as a } from "../../../engine/TemplateSystem.js";
import { View as m } from "../../../engine/View.js";
function p({ props: t, currentData: r, path: o, reactComponent: n }) {
const i = a(t.attributes);
return n ? /* @__PURE__ */ e(c, { ...t, children: /* @__PURE__ */ e(n, { ...i, children: t.content && /* @__PURE__ */ e(
m,
{
currentData: r.content ?? void 0,
datafield: "content",
path: o + ".content",
props: t.content
}
) }) }) : null;
}
export {
p as ReactiveJsonBasicComponentWrapper
};