UNPKG

@luciodale/react-searchable-dropdown

Version:
10 lines (9 loc) 547 B
import { MutableRefObject } from 'react'; /** * A custom React hook to detect clicks outside of one or more specified DOM elements. * * @param {Array<React.RefObject<HTMLElement>>} refs - An array of ref objects attached to the DOM elements you want to monitor. * @param {() => void} handler - The callback function to execute when a click occurs outside all monitored elements. */ export declare function useClickOutside(refs: MutableRefObject<HTMLElement | null>[], handler: () => void): void; //# sourceMappingURL=useClickOutside.d.ts.map