UNPKG

use-dom-outside-click

Version:

react hook to handle outside click on elements

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