Skip to content

ConfirmDialogProps

ConfirmDialogProps are the props of ReactComponent.ConfirmDialog.

type ConfirmDialogProps = {
isOpen?: boolean;
allowHTML?: boolean;
titleText: string;
descriptionText?: string;
confirmText?: string;
cancelText?: string;
confirmLabel?: string;
onConfirm?: (event: React.MouseEvent<HTMLButtonElement>) => void;
onClose?: (event: React.MouseEvent<HTMLButtonElement>) => void;
onOutside?: (event: React.MouseEvent<HTMLButtonElement>) => void;
};
PropDescription
isOpenShows the dialog. Defaults to true.
allowHTMLRenders titleText and descriptionText as HTML. Defaults to false.
titleText, descriptionTextThe title and the body text.
confirmText, cancelTextThe button labels.
confirmLabelThe aria-label of the confirm button.
onConfirmRuns when the user clicks the confirm button.
onCloseRuns when the user clicks the cancel button.
onOutsideRuns when the user clicks outside the dialog. Defaults to onClose.

The dialog never closes by itself, so set isOpen to false in each handler.