@tauri-apps/plugin-dialog - v2.3.1
    Preparing search index...

    Function confirm

    • Shows a question dialog with Ok and Cancel buttons.

      Parameters

      • message: string

        The message to show.

      • Optionaloptions: string | ConfirmDialogOptions

        The dialog's options. If a string, it represents the dialog title.

      Returns Promise<boolean>

      A promise resolving to a boolean indicating whether Ok was clicked or not.

      import { confirm } from '@tauri-apps/plugin-dialog';
      const confirmed = await confirm('Are you sure?', 'Tauri');
      const confirmed2 = await confirm('This action cannot be reverted. Are you sure?', { title: 'Tauri', kind: 'warning' });

      2.0.0