dynamic-modal
Version:
The dynamic-modal is a solution of creation different modals into project using a json configuration file
13 lines (12 loc) • 593 B
JavaScript
'use client';
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ComponentState = exports.ComponentStateContext = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const react_1 = require("react");
exports.ComponentStateContext = (0, react_1.createContext)({});
const ComponentState = ({ children, components, }) => {
const value = (0, react_1.useMemo)(() => components, [components]);
return ((0, jsx_runtime_1.jsx)(exports.ComponentStateContext.Provider, { value: value, children: children }));
};
exports.ComponentState = ComponentState;