@base-ui-components/react
Version:
Base UI is a library of headless ('unstyled') React components and low-level hooks. You gain complete control over your app's CSS and accessibility features.
19 lines (18 loc) • 860 B
JavaScript
;
'use client';
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.PopoverPositionerContext = void 0;
exports.usePopoverPositionerContext = usePopoverPositionerContext;
var React = _interopRequireWildcard(require("react"));
const PopoverPositionerContext = exports.PopoverPositionerContext = /*#__PURE__*/React.createContext(undefined);
if (process.env.NODE_ENV !== "production") PopoverPositionerContext.displayName = "PopoverPositionerContext";
function usePopoverPositionerContext() {
const context = React.useContext(PopoverPositionerContext);
if (!context) {
throw new Error('Base UI: PopoverPositionerContext is missing. PopoverPositioner parts must be placed within <Popover.Positioner>.');
}
return context;
}