Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add useEscapeKeyClose custom hook
This commit introduces a new custom hook, useEscapeKeyClose. The hook registers a document-wide keyboard listener that, for any 'Escape' key event, invokes a callback function passed into the hook. Notably, this provides a standard and reusable solution for closing components or other UI elements in response to a user pressing the 'Escape' key.
- Loading branch information