components/bits/ConfirmDialog#
ConfirmDialog()#
Generic confirmation dialog for destructive or irreversible actions.
Supports an icon, a busy state and translated copy.
Renders through StyledDialog so it matches the app's dialog style.
Parameters#
| Parameter | Type |
|---|---|
props |
ConfirmDialogProps |
Returns#
Element
ConfirmDialogProps#
Properties#
busy?#
Keeps the dialog open with a spinner while the action is in flight.
cancelLabel?#
Defaults to the shared common:buttons.cancel label.
children?#
Extra content between the message and the actions (a checkbox, a list).
confirmDisabled?#
Disables the confirm action.
confirmErrorMessage?#
Shown if onConfirm throws. Defaults to a generic "Something went wrong".
confirmLabel#
confirmTooltip?#
Shown on the confirm action, e.g. why it is disabled.
destructive?#
Renders the confirm action in error colors and tints the icon tile.
extraAction?#
A third choice between Cancel and the confirm action (a milder alternative to it).
label#
onClick#
Returns#
void
icon?#
Pass null to drop the icon tile entirely.
maxWidth?#
xs (the default) for a one-line question, sm when the copy is longer.
message#
onClose#
Returns#
void
onConfirm#
Runs on confirm. Return a promise to keep the dialog open, disabled, and (after the progress delay) spinning until it settles; a second confirm meanwhile is dropped.
Returns#
unknown
open#
sx?#
Forwarded to the underlying dialog — layering, mostly.