Skip to content

Commit ad27eca

Browse files
committed
change to an enum
1 parent 1f03866 commit ad27eca

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

plugins/dialog/api-iife.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/dialog/guest-js/index.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,16 @@ interface SaveDialogOptions {
8282
*
8383
* @since 2.3.0
8484
*/
85-
export type MessageDialogDefaultButtons =
86-
| 'Ok'
87-
| 'OkCancel'
88-
| 'YesNo'
89-
| 'YesNoCancel'
85+
export enum MessageDialogDefaultButtons {
86+
/** A single `Ok` button with OS default dialog text */
87+
Ok = 'Ok',
88+
/** 2 buttons `Ok` and `Cancel` with OS default dialog texts */
89+
OkCancel = 'OkCancel',
90+
/** 2 buttons `Yes` and `No` with OS default dialog texts */
91+
YesNo = 'YesNo',
92+
/** 3 buttons `Yes`, `No` and `Cancel` with OS default dialog texts */
93+
YesNoCancel = 'YesNoCancel'
94+
}
9095

9196
/**
9297
* The Yes, No and Cancel buttons of a message dialog.

0 commit comments

Comments
 (0)