Components
ConfirmationModal

ConfirmationModal

Confirmation Modals appear after users attempt to trigger an action with an effect that is irreversible or hard to reverse, such as deleting items.

Optional props

onClose

Callback fired when the backdrop or close button is clicked.

type
((event: Event) => void)
default
null

onConfirm

Callback fired when the ok button is clicked.

type
React.MouseEventHandler<HTMLButtonElement>
default
null

onCancel

Callback fired when the cancel button is clicked.

type
React.MouseEventHandler<HTMLButtonElement>
default
null

open

Whether the modal is open or not.

type
boolean
default
false

disabled

Whether the confirm actions is disabled.

type
boolean
default
false

critical

Whether the confirm actions is critical.

type
boolean
default
false

locale

The BCP47 language code for the locale.

type
string
default
en-US

messages

Object containing all messages to be displayed internally in the modal. They include "title", "ok" and "cancel".

type
{ title?: string
undefined; confirm?: string
undefined; cancel?: string
undefined; }
default
null

Related components