use-disclosure
Manages boolean state, provides open, close and toggle handlers, usually used with modals, drawers and popovers
Source
Docs
Package
Usage
use-disclosure hook manages boolean state. It provides open, close and toggle handlers
and accepts optional onOpen and onClose callbacks. You can use it to manage controlled modals,
popovers and other similar components:
Callbacks
The onOpen and onClose callbacks execute when the opened state changes:
Definition
Exported types
UseDisclosureOptions, UseDisclosureHandlers and UseDisclosureReturnValue types are exported from @mantine/hooks package,
you can import them in your application: