import { type DependencyList } from 'react'; /** * When a component needs to implement an escape handler, such as in modal * dialogs, useEscapeKey will handle the events and call the provided callback * handler when an escape key event has been fired. * * @example * useEscapeKey(() => close()) */ export default function useEscapeKey(options: { active?: boolean; callback: (event: KeyboardEvent) => void; event?: 'keydown' | 'keypress' | 'keyup'; target?: T | React.RefObject | React.MutableRefObject; defaultPrevented?: boolean; capture?: boolean; }, dependencies?: DependencyList): void;