Skip to content

Confirm - User Confirmation

Get user confirmation before critical actions.

jsx
openPopup('confirm', {
  data: {
    title: 'Delete Item?',
    message: 'This action cannot be undone. Continue?',
    cancelLabel: 'Cancel',
    confirmLabel: 'Yes, delete',
    confirmStyle: 'Danger',
    icon: '❓',
    onChoose: (confirmed) => {
      if (confirmed) {
        console.log('User confirmed!');
      }
    }
  }
});

Props (data):

PropertyTypeDescription
titleReactNodePopup title
messageReactNodeConfirmation message
cancelLabelReactNodeCancel button text
confirmLabelReactNodeConfirm button text
confirmStyle'default' | 'Secondary' | 'Success' | 'Danger'Confirm button style
iconReactNodeHeader icon
onChoose(confirmed: boolean) => voidCallback receiving true (confirm) or false (cancel)