UNPKG

@1771technologies/lytenyte-pro

Version:

27 lines (26 loc) 873 B
import * as React from "react"; const PopoverRootContext = /* @__PURE__ */ React.createContext(void 0); if (process.env.NODE_ENV !== "production") { PopoverRootContext.displayName = "PopoverRootContext"; } function usePopoverRootContext() { const context = React.useContext(PopoverRootContext); if (context === void 0) { throw new Error("Base UI: PopoverRootContext is missing. Popover parts must be placed within <Popover.Root>."); } return context; } const PopoverPortalContext = /* @__PURE__ */ React.createContext(void 0); function usePopoverPortalContext() { const value = React.useContext(PopoverPortalContext); if (value === void 0) { throw new Error("Base UI: <Popover.Portal> is missing."); } return value; } export { PopoverRootContext as P, usePopoverPortalContext as a, PopoverPortalContext as b, usePopoverRootContext as u };