mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-06-30 15:35:33 +02:00
refactor(dialog)!: use enum instead of label for buttons (#1842)
* refactor(dialog)!: use enum instead of label * Add change file * Fix doc comment typo * Move ok and cancel to lib.rs
This commit is contained in:
@@ -49,3 +49,18 @@ impl Serialize for MessageDialogKind {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Set of button that will be displayed on the dialog
|
||||
#[non_exhaustive]
|
||||
#[derive(Debug, Default, Clone)]
|
||||
pub enum MessageDialogButtons {
|
||||
#[default]
|
||||
/// A single `Ok` button with OS default dialog text
|
||||
Ok,
|
||||
/// 2 buttons `Ok` and `Cancel` with OS default dialog texts
|
||||
OkCancel,
|
||||
/// A single `Ok` button with custom text
|
||||
OkCustom(String),
|
||||
/// 2 buttons `Ok` and `Cancel` with custom texts
|
||||
OkCancelCustom(String, String),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user