UNPKG

@wix/design-system

Version:

@wix/design-system

10 lines 428 B
import { useContext } from 'react'; import { PopoverNextContext } from '../PopoverNext.context'; export const usePopoverNextContext = () => { const context = useContext(PopoverNextContext); if (context === null) { throw new Error('<PopoverNext.Trigger /> and <PopoverNext.Content /> components must be wrapped with <PopoverNext />'); } return context; }; //# sourceMappingURL=usePopoverNextContext.js.map