UNPKG

@yamada-ui/react

Version:

React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion

22 lines (18 loc) 624 B
"use client"; import { createSystem, defaultSystem } from "./create-system.js"; import { createContext, use, useMemo } from "react"; import { jsx } from "react/jsx-runtime"; //#region src/core/system/system-provider.tsx const SystemContext = createContext(defaultSystem); const SystemProvider = ({ children, config, theme = {} }) => { return /* @__PURE__ */ jsx(SystemContext, { value: useMemo(() => createSystem(theme, config), [theme, config]), children }); }; const useSystem = () => { return use(SystemContext); }; //#endregion export { SystemProvider, useSystem }; //# sourceMappingURL=system-provider.js.map