UNPKG

react-chrono

Version:
8 lines (7 loc) 373 B
import { RefObject } from 'react'; /** * Custom hook that handles click outside and escape key events * @param el - Reference to the DOM element to watch for outside clicks * @param callback - Function to call when a click outside or escape key is detected */ export default function useCloseClickOutside(el: RefObject<HTMLElement | null>, callback: () => void): void;