Behive Tech Component Registry

Confirm Dialog

v0.2.8Stable

A `Modal` pre-wired with a message and confirm/cancel actions, for "are you sure?" moments such as confirming a delete.

pnpm add @behivetech/molecules.confirm-dialog

A Modal pre-wired with a message and confirm/cancel actions, for "are you sure?" moments such as confirming a delete.

Usage

Open in new tab

Properties

ConfirmDialog props

PropTypeDefaultDescription
message*ReactNode—Confirmation message/body content
onConfirm*() => void—Called when the confirm button is clicked, before the dialog closes
onOpenChange*(open: boolean) => void—Called when the dialog should close (cancel, confirm, backdrop click, Escape)
open*boolean—Whether the dialog is open
title*string—Dialog title
cancelLabelstringCancelCancel button label; defaults to "Cancel"
confirmLabelstringConfirmConfirm button label; defaults to "Confirm"
variant"default" | "danger"defaultRenders the confirm button as a destructive action; defaults to "default"