UNPKG

use-dom-outside-click

Version:

react hook to handle outside click on elements

4 lines (3 loc) 224 B
import { MutableRefObject } from "react"; declare const useOutsideClick: <T extends HTMLElement>(ref: MutableRefObject<T>, callback: () => void, exceptionsRefs?: MutableRefObject<any>[]) => void; export { useOutsideClick };