@dnanpm/styleguide
Version:
DNA Styleguide repository provides the set of components and theme object used in various DNA projects.
10 lines (9 loc) • 342 B
TypeScript
import type { RefObject } from 'react';
/**
* Hook to handle the click outside the referenced element
*
* @param {RefObject<Element>} ref - reference to the targeted element
* @param {Function} callback - callback
*/
declare const useOutsideClick: (ref: RefObject<Element>, callback: () => void) => void;
export default useOutsideClick;