OptionaltitleThe title of the dialog. Defaults to the app name.
OptionalkindThe kind of the dialog. Defaults to info.
OptionalokThe label of the Ok button.
Use MessageDialogOptions.buttons instead.
OptionalbuttonsThe buttons of the dialog.
// 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' }
})
Since
2.0.0