UNPKG

@expofp/floorplan

Version:

Interactive floor plan library for expos and events

14 lines 708 B
import { type RefObject } from 'react'; type Ref = RefObject<HTMLElement | null>; /** * Calls `handler` when a click or touch lands outside every ref in `refs`, * while `enabled` is true. * * The listeners are attached to `document`. Both `refs` and `handler` are held * in refs, so passing an inline array/arrow does not re-subscribe on every * render — the listeners are only (re)attached when `enabled` flips. Pass the * open state as `enabled` so the listeners exist only while the popup is open. */ declare function useOnClickOutside(refs: Ref | Ref[], handler: (event: Event) => void, enabled?: boolean): void; export default useOnClickOutside; //# sourceMappingURL=useOnClickOutside.d.ts.map