AlertDialog
import * as AlertDialog from '@dxos/react-ui/AlertDialog';An alert dialog is a dialog that asks the user to confirm or cancel. Only its own buttons close it. It opens with
focus on AlertDialog.Cancel, the least destructive choice.
| Part | What it is |
|---|---|
AlertDialog.Root |
The root, which holds the open state |
AlertDialog.Trigger |
The control that opens the dialog |
AlertDialog.Content |
The dialog itself |
AlertDialog.Header |
The row that holds AlertDialog.Title |
AlertDialog.Title |
The dialog’s name |
AlertDialog.Description |
The text that says what confirming will do |
AlertDialog.Body |
Any further content |
AlertDialog.Footer |
The row of buttons |
AlertDialog.Cancel |
The button that closes the dialog without acting |
AlertDialog.Action |
The button that confirms. It runs onClick, then closes the dialog unless the handler prevents it |