ui: Fix error code in button comment (#26423)

lydiandy created

Closes #ISSUE

Release Notes:
ui: Fix error code in button comment.

- N/A *or* Added/Fixed/Improved ...

Change summary

crates/ui/src/components/button/button.rs | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)

Detailed changes

crates/ui/src/components/button/button.rs 🔗

@@ -29,7 +29,7 @@ use super::button_icon::ButtonIcon;
 /// use ui::prelude::*;
 ///
 /// Button::new("button_id", "Click me!")
-///     .on_click(|event, cx| {
+///     .on_click(|event, window, cx| {
 ///         // Handle click event
 ///     });
 /// ```
@@ -44,7 +44,7 @@ use super::button_icon::ButtonIcon;
 /// Button::new("button_id", "Click me!")
 ///     .icon(IconName::Check)
 ///     .selected(true)
-///     .on_click(|event, cx| {
+///     .on_click(|event, window, cx| {
 ///         // Handle click event
 ///     });
 /// ```
@@ -58,7 +58,7 @@ use super::button_icon::ButtonIcon;
 /// Button::new("button_id", "Click me!")
 ///     .selected(true)
 ///     .selected_style(ButtonStyle::Tinted(TintColor::Accent))
-///     .on_click(|event, cx| {
+///     .on_click(|event, window, cx| {
 ///         // Handle click event
 ///     });
 /// ```
@@ -72,7 +72,7 @@ use super::button_icon::ButtonIcon;
 ///
 /// let button = Button::new("button_id", "Click me!")
 ///     .full_width()
-///     .on_click(|event, cx| {
+///     .on_click(|event, window, cx| {
 ///         // Handle click event
 ///     });
 /// ```
@@ -230,7 +230,7 @@ impl Toggleable for Button {
     ///
     /// Button::new("button_id", "Click me!")
     ///     .selected(true)
-    ///     .on_click(|event, cx| {
+    ///     .on_click(|event, window, cx| {
     ///         // Handle click event
     ///     });
     /// ```
@@ -254,7 +254,7 @@ impl SelectableButton for Button {
     /// Button::new("button_id", "Click me!")
     ///     .selected(true)
     ///     .selected_style(ButtonStyle::Tinted(TintColor::Accent))
-    ///     .on_click(|event, cx| {
+    ///     .on_click(|event, window, cx| {
     ///         // Handle click event
     ///     });
     /// ```
@@ -278,7 +278,7 @@ impl Disableable for Button {
     ///
     /// Button::new("button_id", "Click me!")
     ///     .disabled(true)
-    ///     .on_click(|event, cx| {
+    ///     .on_click(|event, window, cx| {
     ///         // Handle click event
     ///     });
     /// ```
@@ -319,7 +319,7 @@ impl FixedWidth for Button {
     ///
     /// Button::new("button_id", "Click me!")
     ///     .width(px(100.).into())
-    ///     .on_click(|event, cx| {
+    ///     .on_click(|event, window, cx| {
     ///         // Handle click event
     ///     });
     /// ```
@@ -339,7 +339,7 @@ impl FixedWidth for Button {
     ///
     /// Button::new("button_id", "Click me!")
     ///     .full_width()
-    ///     .on_click(|event, cx| {
+    ///     .on_click(|event, window, cx| {
     ///         // Handle click event
     ///     });
     /// ```
@@ -383,7 +383,7 @@ impl ButtonCommon for Button {
     ///
     /// Button::new("button_id", "Click me!")
     ///     .tooltip(Tooltip::text_f("This is a tooltip", cx))
-    ///     .on_click(|event, cx| {
+    ///     .on_click(|event, window, cx| {
     ///         // Handle click event
     ///     });
     /// ```