| | **`content`** | `ReactNode` | `null` | Dialog content, same as `description` but not wrapped in `DialogContentText`. Supersedes `description` if present. | | **`confirmationText`** | `ReactNode` | `'Ok'` | Confirmation button caption. | | **`cancellationText`** | `ReactNode` | `'Cancel'` | Cancellation button caption. | | **`dialogProps`** | `object` | `{}` | Material-UI [Dialog](https://mui.com/material-ui/api/dialog/#props) props. | | **`dialogActionsProps`** | `object` | `{}` | Material-UI [DialogActions](https://mui.com/material-ui/api/dialog-actions/#props) props. | | **`confirmationButtonProps`** | `object` | `{}` | Material-UI [Button](https://mui.com/material-ui/api/button/#props) props for the confirmation button. | | **`cancellationButtonProps`** | `object` | `{}` | Material-UI [Button](https://mui.com/material-ui/api/dialog/#props) props for the cancellation button. | | **`titleProps`** | `object` | `{}` | Material-UI [DialogTitle](https://mui.com/api/dialog-title/#props) props for the dialog title. | | **`contentProps`** | `object` | `{}` | Material-UI [DialogContent](https://mui.com/api/dialog-content/#props) props for the dialog content. | | **`allowClose`** | `boolean` | `true` | Whether natural close (escape or backdrop click) should close the dialog. When set to `false` force the user to either cancel or confirm explicitly. | | **`confirmationKeyword`** | `string` | `undefined` | If provided the confirmation button will be disabled by default and an additional textfield will be rendered. The confirmation button will only be enabled when the contents of the textfield match the value of `confirmationKeyword` | | **`confirmationKeywordTextFieldProps`** | `object` | `{}` | Material-UI [TextField](https://mui.com/material-ui/api/text-field/) props for the confirmation keyword textfield. | | **`acknowledgement`** | `string` | `undefined` | If provided shows the acknowledge checkbox with this string as checkbox label and disables the confirm button while the checkbox is unchecked. | | **`acknowledgementFormControlLabelProps`** | `object` | `{}` | Material-UI [FormControlLabel](https://mui.com/material-ui/api/form-control-label/#props) props for the form control label. | | **`acknowledgementCheckboxProps`** | `object` | `{}` | Material-UI [Checkbox](https://mui.com/material-ui/api/checkbox/#props) props for the acknowledge checkbox. | | **`hideCancelButton`** | `boolean` | `false` | Whether to hide the cancel button. | | **`buttonOrder`** | `string[]` | `["cancel", "confirm"]` | Specify the order of confirm and cancel buttons. | ## Useful notes ### Confirm by pressing _Enter_ You can get this behavior by adding the `autoFocus` property to the confirmation button. This way the button is focused as soon as the dialog opens and hitting _Enter_ naturally triggers a click. ##### Locally ```jsx const MyComponent = () => { // ... const handleClick = () => { confirm({ confirmationButtonProps: { autoFocus: true } }) .then(() => { /* ... */ }) .catch(() => { /* ... */ }); }; // ... }; ``` ##### Globally ```jsx const App = () => { return ( {/* ... */} ); }; ```