UNPKG

@lobehub/ui

Version:

Lobe UI is an open-source UI component library for building AIGC web apps

23 lines (20 loc) 646 B
'use client'; import { createContext, memo, use } from "react"; import { jsx } from "react/jsx-runtime"; //#region src/Popover/context.tsx const noop = process.env.NODE_ENV === "production" ? () => void 0 : () => { throw new Error("usePopoverContext must be used within a PopoverProvider"); }; const PopoverContext = createContext({ close: noop }); const PopoverProvider = memo(({ children, value }) => { return /* @__PURE__ */ jsx(PopoverContext, { value, children }); }); const usePopoverContext = () => { return use(PopoverContext); }; //#endregion export { PopoverProvider, usePopoverContext }; //# sourceMappingURL=context.mjs.map