alepha@docs:~/docs/reference/react-hooks$
cat useDialog.md
1 min read
Last commit:

#useDialog

#Import

typescript
1import { useDialog } from "@alepha/ui/styles";

#Overview

Use this hook to access the Dialog Service for showing various dialog types.

#Examples

tsx
1const dialog = useDialog();2await dialog.alert({ title: "Alert", message: "This is an alert message" });3const confirmed = await dialog.confirm({ title: "Confirm", message: "Are you sure?" });4const input = await dialog.prompt({ title: "Input", message: "Enter your name:" });