Bain Logo

Confirm Dialog

Jump to Props

Base-level dialog for confirmation

Note: This is the underlying component that is displayed when the user triggers a confirmation modal. In most cases, you'll want to use the ConfirmDialogTrigger component which handles all of the opening and closing etc.

Import

Basic usage

For more, visit the ConfirmDialogTrigger page.

Props

  • Props
  • Styled Functions
PropTypeDefaultDescription
confirmActionTypeprimary | destructiveprimary

Decides what type of button to show for user to confirm.

confirmButtonLabelstringConfirm

Text to display in the confirm action button.

cancelButtonLabelstringCancel

Text to display in the cancel action button.

dialogTitlestringPlease Confirm

Text to display in the dialog's title.

dialogBodystringPlease take a moment to confirm you wish to perform this action.

Text to display in the dialog's body.

onConfirmfunction

The function to call when the user clicks the confirm button.

onCancelfunction

The function to call when the user clicks the cancel button.

onClosefunction

The function to call after the dialog closes.

isOpenboolean

Flag to state whether or not the dialog is visible.

© 2021, Made with ❤️
by ADAPT @ Bain & Company
Privacy Policy