alepha@docs:~/docs/.content/release/framework/docs/reference/react-hooks$
cat useSettingsDialog.md | pretty
1 min read
Last commit:

#useSettingsDialog

#Import

typescript
1import { useSettingsDialog } from "@alepha/ui/settings";

#Overview

A settings dialog's state and the way to open and close it.

tsx
1const account = useSettingsDialog("account");2if (account.sections.length === 0) return null;3return <Button onClick={() => account.open("sessions")}>Sessions</Button>;