Back
ConfirmAction
Danger (default)
Click the button below — it reveals a confirm/cancel prompt inline.
Confirm Action
Are you sure you want to perform this action?
Primary
Confirm Action
Are you sure you want to perform this action?
Usage
Wrap any trigger element. Listen for the custom confirm-action event dispatched on confirm.
@feedback.ConfirmAction(feedback.ConfirmActionProps{
ConfirmLabel: "Delete", // default: "Confirm"
CancelLabel: "Cancel", // default: "Cancel"
Variant: "danger", // "danger" | "primary"
}) {
<button>Delete item</button>
}
// Listen for confirmation:
// <div x-on:confirm-action="handleDelete()">