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

    Function ask

    • Shows a question dialog with Yes and No 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 Yes was clicked or not.

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

      2.0.0