Dialog API
import { Dialog } from '@editora/ui-react';
Props
| Prop | Type | Description |
|---|---|---|
cancelText | string | |
children | React.ReactNode | |
closable | boolean | |
closeOnEsc | boolean | |
closeOnOverlay | boolean | |
config | UIDialogTemplateOptions | |
description | string | |
dialogId | string | |
dismissible | boolean | |
headless | boolean | |
initialFocus | string | |
loadingText | string | |
lockWhileLoading | boolean | |
onClose | () => void | |
onDialogCancel | (detail: UIDialogCancelDetail) => void | |
onDialogClose | (detail: UIDialogCloseDetail) => void | |
onDialogDismiss | (detail: UIDialogDismissDetail) => void | |
onDialogOpen | (detail: UIDialogOpenDetail) => void | |
onDialogSubmit | (detail: UIDialogSubmitDetail) => void | |
onOpen | () => void | |
onRequestClose | (detail: DialogRequestCloseDetail) => void | |
open | boolean | |
roleType | 'dialog' | 'alertdialog' | |
size | 'sm' | 'md' | 'lg' | '1' | '2' | '3' | |
state | 'idle' | 'loading' | 'error' | 'success' | |
submitText | string | |
title | string |
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Element: <ui-dialog>
Dialog renders the ui-dialog custom element from @editora/ui-core, which can also be used without React.
Attributes: aria-describedby, aria-label, aria-labelledby, cancel-text, closable, close-on-backdrop, close-on-esc, close-on-overlay, description, dialog-role, dismissible, error-message, headless, initial-focus, loading-text, lock-while-loading, open, role, size, state, submit-text, title
Events: hide, request-close, show, ui-request-close