AlertDialog API
import { AlertDialog } from '@editora/ui-react';
Props
| Prop | Type | Description |
|---|---|---|
children | React.ReactNode | |
closeOnBackdrop | boolean | |
closeOnEsc | boolean | |
config | UIAlertDialogTemplateOptions | |
dialogId | string | |
dismissible | boolean | |
elevation | 'none' | 'low' | 'high' | |
headless | boolean | |
indicator | 'line' | 'none' | |
initialFocus | string | |
lockWhileLoading | boolean | |
onCancel | (detail: UIAlertDialogCancelDetail) => void | |
onChange | (detail: { id: string; inputValue?: string; checked?: boolean }) => void | |
onClose | (detail: UIAlertDialogCloseDetail) => void | |
onConfirm | (detail: UIAlertDialogConfirmDetail) => void | |
onDismiss | (detail: UIAlertDialogDismissDetail) => void | |
onOpen | (detail: UIAlertDialogOpenDetail) => void | |
open | boolean | |
radius | number | string | |
roleType | 'alertdialog' | 'dialog' | |
size | 'sm' | 'md' | 'lg' | '1' | '2' | '3' | |
state | 'idle' | 'loading' | 'error' | |
tone | 'neutral' | 'info' | 'success' | 'warning' | 'danger' | |
variant | 'surface' | 'soft' | 'outline' | 'solid' |
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Element: <ui-alert-dialog>
AlertDialog renders the ui-alert-dialog custom element from @editora/ui-core, which can also be used without React.
Attributes: aria-describedby, aria-label, aria-labelledby, cancel-text, close-on-backdrop, close-on-esc, confirm-text, description, dialog-role, dismissible, elevation, error-message, headless, indicator, initial-focus, loading-text, lock-while-loading, open, radius, role, size, state, title, tone, variant