AlertDialog
The props declared for AlertDialog, generated from the types @proyecto-viviana/ui ships.
Import
import { AlertDialog } from "@proyecto-viviana/ui";Props
| Prop | Type | Default | Description |
|---|---|---|---|
title* | string | — | The title of the alert dialog. |
children* | JSX.Element | — | The content/message of the alert dialog. |
trigger | number | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement | — | The trigger element that opens the dialog. |
variant | 'warning' | 'error' | 'confirmation' | 'information' | 'destructive' | 'confirmation' | The variant of the alert dialog. |
primaryActionLabel | string | — | Label for the primary action button. |
secondaryActionLabel | string | — | Label for the secondary action button. |
cancelLabel | string | — | Label for the cancel button. |
onPrimaryAction | () => void | — | Handler called when the primary action is triggered. |
onSecondaryAction | () => void | — | Handler called when the secondary action is triggered. |
onCancel | () => void | — | Handler called when canceled. |
isPrimaryActionDisabled | false | true | — | Whether the primary action button is disabled. |
isSecondaryActionDisabled | false | true | — | Whether the secondary action button is disabled. |
autoFocusButton | 'primary' | 'secondary' | 'cancel' | — | Which action button should receive initial focus. |
size | 'S' | 'M' | 'L' | — | The size of the alert dialog. |
isOpen | false | true | — | Whether the dialog is open. |
defaultOpen | false | true | — | Whether the dialog is open by default. |
onOpenChange | (isOpen: boolean) => void | — | Handler called when open state changes. |
isDismissible | false | true | — | Whether the dialog is dismissible. Alert dialogs default to false. |
isDismissable | false | true | — | Alias for isDismissible, retained for older Solid Spectrum examples. |
class | string | — | Additional CSS class name. |
Declared in packages/viviana-ui/src/dialog/AlertDialog.tsx.
Props marked solidaria or solidaria-components come from the headless layer underneath and behave the same in both registers. Components that wrap a DOM element also accept that element's standard attributes, which are left out here on purpose — listing them would bury the props that are actually ours.