useClickAway
Execute a function when the user clicks outside a target element.
Type Definitions
const useClickAway: <T extends HTMLElement = HTMLDivElement>(args: {
handler: (event: MouseEvent) => any;
ref?: React.RefObject<T> | null;
}) => React.RefObject<T>;