Dialog
View Source
A UX compliant dialog that uses HTMLDialogElement under the hood.
Props
body
ReactReactNode | stringBody of the dialog to display in the main content area.
cancelText
stringText to display on the cancel button.
confirmText
stringText to display on the confirm button.
destroyText
stringText to display on the destroy button.
dialogRef
ReactMutableRefObjectCreate with the React.useRef() hook and pass the ref to the dialog.
onCancelClick
() => voidCallback fired when the cancel button is clicked.
onCloseClick
() => voidCallback fired when the close (X) button is clicked.
onConfirmClick
() => voidCallback fired when the confirm button is clicked.
onDestroyClick
() => voidCallback fired when the destroy button is clicked.
showCancel
booleanDetermines whether the cancel button is shown.
showDestroy
booleanDetermines whether the destroy button is shown.
subtitle
stringSubtitle of the dialog to display in the header. No subtitle appears if omitted.
title
stringTitle of the dialog to display in the header.