import type { RefObject } from 'react'; /** * A hook that detects clicks outside of a specified element. * Useful for closing modals, dropdowns, or other UI elements when clicking outside. * * @param ref - A ref to the element to detect clicks outside of * @param handler - The function to call when a click outside is detected * * @example * ```tsx * const modalRef = useRef(null) * const [isOpen, setIsOpen] = useState(false) * * useOnClickOutside(modalRef, () => setIsOpen(false)) * * return ( * {isOpen && ( *
* Modal content *
* )} * ) * ``` */ export declare function useOnClickOutside(ref: RefObject, handler: (event: MouseEvent | TouchEvent) => void): void; //# sourceMappingURL=useOnClickOutside.d.ts.map