콘텐츠로 이동

MessageDialogOptions

이 콘텐츠는 아직 번역되지 않았습니다.

Module @netwiv/api/plugins/dialog · Kind Interface

import { MessageDialogOptions } from '@netwiv/api/plugins/dialog';
buttons?: MessageDialogButtons | undefined

The buttons of the dialog.

Example

// Use system default buttons texts
await message('Hello World!', { buttons: 'Ok' })
await message('Hello World!', { buttons: 'OkCancel' })
// Or with custom button texts
await message('Hello World!', { buttons: { ok: 'Yes!' } })
await message('Take on the task?', {
buttons: { ok: 'Accept', cancel: 'Cancel' }
})
await message('Show the file content?', {
buttons: { yes: 'Show content', no: 'Show in folder', cancel: 'Cancel' }
})
kind?: "info" | "warning" | "error" | undefined

The kind of the dialog. Defaults to info.

okLabel?: string | undefined

The label of the Ok button.

Deprecated Use {@linkcode MessageDialogOptions.buttons} instead.

title?: string | undefined

The title of the dialog. Defaults to the app name.

Upstream since 2.0.0


Descriptions come from the pinned @tauri-apps/plugin-dialog@2.7.3 declarations (MIT OR Apache-2.0); imports are shown with @netwiv/api paths.