volleyball-dev-frontend/node_modules/@headlessui/react/dist/components/popover/popover-machine-glue.js
Marc Wieland 33181acf83
Some checks are pending
Deploy Volleyball CMS / deploy (push) Waiting to run
Last
2025-06-02 18:56:22 +02:00

2 lines
566 B
JavaScript

import{createContext as t,useContext as n,useMemo as i}from"react";import{useOnUnmount as c}from'../../hooks/use-on-unmount.js';import{PopoverMachine as p}from'./popover-machine.js';const a=t(null);function u(r){let o=n(a);if(o===null){let e=new Error(`<${r} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,u),e}return o}function f({id:r,__demoMode:o=!1}){let e=i(()=>p.new({id:r,__demoMode:o}),[]);return c(()=>e.dispose()),e}export{a as PopoverContext,f as usePopoverMachine,u as usePopoverMachineContext};