refactor(api): change `button_state` to camelCase (#11114)

This commit is contained in:
Lucas Fernandes Nogueira 2024-09-24 08:18:52 -03:00 committed by GitHub
parent e08c4e6888
commit 948772a657
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 1 deletions

View File

@ -0,0 +1,6 @@
---
"@tauri-apps/api": patch:breaking
"tauri": patch:bug
---
Change the `button_state` tray event field to camelCase `buttonState`.

View File

@ -79,6 +79,7 @@ impl From<tray_icon::MouseButton> for MouseButton {
#[non_exhaustive]
pub enum TrayIconEvent {
/// A click happened on the tray icon.
#[serde(rename_all = "camelCase")]
Click {
/// Id of the tray icon which triggered this event.
id: TrayIconId,

View File

@ -26,7 +26,7 @@ export interface TrayIconClickEvent {
/** Mouse button that triggered this event. */
button: MouseButton
/** Mouse button state when this event was triggered. */
button_state: MouseButtonState
buttonState: MouseButtonState
}
/** A double click happened on the tray icon. **Windows Only** */