Skip to content

Commit 355fc91

Browse files
committed
Add examples
1 parent 38ef933 commit 355fc91

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

plugins/dialog/guest-js/index.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,23 @@ interface MessageDialogOptions {
168168
/**
169169
* The buttons of the dialog.
170170
*
171+
* @example
172+
*
173+
* ```ts
174+
* // Use system default buttons texts
175+
* await message('Hello World!', { buttons: 'Ok' })
176+
* await message('Hello World!', { buttons: 'OkCancel' })
177+
*
178+
* // Or with custom button texts
179+
* await message('Hello World!', { buttons: { ok: 'Yes!' } })
180+
* await message('Take on the task?', {
181+
* buttons: { ok: 'Accept', cancel: 'Cancel' }
182+
* })
183+
* await message('Show the file content?', {
184+
* buttons: { yes: 'Show content', no: 'Show in folder', cancel: 'Cancel' }
185+
* })
186+
* ```
187+
*
171188
* @since 2.4.0
172189
*/
173190
buttons?: MessageDialogButtons

0 commit comments

Comments
 (0)