ConfirmDialog

Modal confirmation dialog with optional injected content (e.g. a select element). Clicking the overlay background counts as a cancel.

Constructor

new ConfirmDialog(titleText, callbacks, warningTextopt, confirmTextopt, cancelTextopt, contentInjectionopt)

Parameters:
NameTypeAttributesDefaultDescription
titleTextstringHeader text for the dialog (may contain HTML)
callbacksobjectCallback functions for dialog actions
Properties
NameTypeAttributesDescription
onConfirmfunction<optional>
Called when the confirm button is clicked
onDismissfunction<optional>
Called when cancel or the overlay is clicked
warningTextstring<optional>
''Body text shown below the title
confirmTextstring<optional>
'Confirm'Label for the confirm button
cancelTextstring<optional>
'Cancel'Label for the cancel button
contentInjectionHTMLElement | null<optional>
nullOptional element inserted into the body

Classes

ConfirmDialog