@focuson/form_components
Version:
Components that can be used by @focuson/forms
10 lines (9 loc) • 708 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.WithTextLayout = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const pages_1 = require("@focuson/pages");
function WithTextLayout({ children, text, holderClassName, textClassName, childrenClassName, state }) {
return (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: holderClassName }, { children: [(0, jsx_runtime_1.jsx)("div", { className: textClassName, dangerouslySetInnerHTML: { __html: (0, pages_1.replaceTextUsingPath)(state, text) } }), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: childrenClassName }, { children: children }))] }));
}
exports.WithTextLayout = WithTextLayout;