Skip to content

ftxConfirm

Shows a confirmation dialog with OK and Cancel buttons.

Parameters

  • options (Object | String) - Confirmation options or message string
    • message (String) - Confirmation message (required if options is object)
    • title (String) - Dialog title (default: 'Confirm')
    • icon (String) - Icon to display
    • okLabel (String) - Label for OK button (default: 'Yes')
    • cancelLabel (String) - Label for Cancel button (default: 'No')
    • $q (Object) - Optional Quasar instance

Returns

Dialog instance with event handlers:

  • onOk(callback) - Called when OK button clicked
  • onCancel(callback) - Called when Cancel clicked
  • onDismiss(callback) - Called on any dismissal

Usage

Basic Confirmation

javascript
import { ftxConfirm } from '@ftx/ui';

ftxConfirm({
  title: 'Delete Item',
  message: 'Are you sure you want to delete this item?',
  icon: 'warning'
})
  .onOk(() => {
    deleteItem();
  })
  .onCancel(() => {
    console.log('Cancelled');
  });

Simple Message

javascript
import { ftxConfirm } from '@ftx/ui';

ftxConfirm('Are you sure?')
  .onOk(() => {
    proceed();
  });

Released under the MIT License.