UNPKG

@payfit/unity-components

Version:

14 lines (13 loc) 521 B
import { createContext as e, useContext as t } from "react"; import { jsx as n } from "react/jsx-runtime"; //#region src/components/definition-list/DefinitionList.context.tsx var r = e(void 0), i = ({ children: e, layout: t }) => /* @__PURE__ */ n(r.Provider, { value: { layout: t }, children: e }), a = () => { let e = t(r); if (!e) throw Error("useDefinitionListContext must be used within a DefinitionList"); return e; }; //#endregion export { i as DefinitionListContextProvider, a as useDefinitionListContext };