Global

Members

# constant useClickOutside

It returns a function that checks if the click is outside the component and a function that adds an event listener to the document

View Source hooks/useClickOutside.js, line 9

# constant useForm

Custom hook to manage form state and validation

View Source hooks/useForm.js, line 10

# constant useKeypress

"When the key is pressed, call the handler function."

The function add an event listener to the document. When the keydown event is fired, the function checks if the isOpenStateInParent is true. If it is, the function checks if the event.key is equal to the key argument. If it is, the handler function is called

View Source hooks/useKeypress.js, line 16

# constant useTrapFocus

"When the modal is open, listen for the tab key and prevent the user from tabbing out of the modal."

The function add a keydown event listener to the document. The event listener is only added when the modal is open

View Source hooks/useTrapFocus.js, line 13