ui: Fix error code in button comment (#26423)
Closes #ISSUE Release Notes: ui: Fix error code in button comment. - N/A *or* Added/Fixed/Improved ...
This commit is contained in:
parent
c37d6d5fed
commit
8ceba89d81
1 changed files with 10 additions and 10 deletions
|
@ -29,7 +29,7 @@ use super::button_icon::ButtonIcon;
|
||||||
/// use ui::prelude::*;
|
/// use ui::prelude::*;
|
||||||
///
|
///
|
||||||
/// Button::new("button_id", "Click me!")
|
/// Button::new("button_id", "Click me!")
|
||||||
/// .on_click(|event, cx| {
|
/// .on_click(|event, window, cx| {
|
||||||
/// // Handle click event
|
/// // Handle click event
|
||||||
/// });
|
/// });
|
||||||
/// ```
|
/// ```
|
||||||
|
@ -44,7 +44,7 @@ use super::button_icon::ButtonIcon;
|
||||||
/// Button::new("button_id", "Click me!")
|
/// Button::new("button_id", "Click me!")
|
||||||
/// .icon(IconName::Check)
|
/// .icon(IconName::Check)
|
||||||
/// .selected(true)
|
/// .selected(true)
|
||||||
/// .on_click(|event, cx| {
|
/// .on_click(|event, window, cx| {
|
||||||
/// // Handle click event
|
/// // Handle click event
|
||||||
/// });
|
/// });
|
||||||
/// ```
|
/// ```
|
||||||
|
@ -58,7 +58,7 @@ use super::button_icon::ButtonIcon;
|
||||||
/// Button::new("button_id", "Click me!")
|
/// Button::new("button_id", "Click me!")
|
||||||
/// .selected(true)
|
/// .selected(true)
|
||||||
/// .selected_style(ButtonStyle::Tinted(TintColor::Accent))
|
/// .selected_style(ButtonStyle::Tinted(TintColor::Accent))
|
||||||
/// .on_click(|event, cx| {
|
/// .on_click(|event, window, cx| {
|
||||||
/// // Handle click event
|
/// // Handle click event
|
||||||
/// });
|
/// });
|
||||||
/// ```
|
/// ```
|
||||||
|
@ -72,7 +72,7 @@ use super::button_icon::ButtonIcon;
|
||||||
///
|
///
|
||||||
/// let button = Button::new("button_id", "Click me!")
|
/// let button = Button::new("button_id", "Click me!")
|
||||||
/// .full_width()
|
/// .full_width()
|
||||||
/// .on_click(|event, cx| {
|
/// .on_click(|event, window, cx| {
|
||||||
/// // Handle click event
|
/// // Handle click event
|
||||||
/// });
|
/// });
|
||||||
/// ```
|
/// ```
|
||||||
|
@ -230,7 +230,7 @@ impl Toggleable for Button {
|
||||||
///
|
///
|
||||||
/// Button::new("button_id", "Click me!")
|
/// Button::new("button_id", "Click me!")
|
||||||
/// .selected(true)
|
/// .selected(true)
|
||||||
/// .on_click(|event, cx| {
|
/// .on_click(|event, window, cx| {
|
||||||
/// // Handle click event
|
/// // Handle click event
|
||||||
/// });
|
/// });
|
||||||
/// ```
|
/// ```
|
||||||
|
@ -254,7 +254,7 @@ impl SelectableButton for Button {
|
||||||
/// Button::new("button_id", "Click me!")
|
/// Button::new("button_id", "Click me!")
|
||||||
/// .selected(true)
|
/// .selected(true)
|
||||||
/// .selected_style(ButtonStyle::Tinted(TintColor::Accent))
|
/// .selected_style(ButtonStyle::Tinted(TintColor::Accent))
|
||||||
/// .on_click(|event, cx| {
|
/// .on_click(|event, window, cx| {
|
||||||
/// // Handle click event
|
/// // Handle click event
|
||||||
/// });
|
/// });
|
||||||
/// ```
|
/// ```
|
||||||
|
@ -278,7 +278,7 @@ impl Disableable for Button {
|
||||||
///
|
///
|
||||||
/// Button::new("button_id", "Click me!")
|
/// Button::new("button_id", "Click me!")
|
||||||
/// .disabled(true)
|
/// .disabled(true)
|
||||||
/// .on_click(|event, cx| {
|
/// .on_click(|event, window, cx| {
|
||||||
/// // Handle click event
|
/// // Handle click event
|
||||||
/// });
|
/// });
|
||||||
/// ```
|
/// ```
|
||||||
|
@ -319,7 +319,7 @@ impl FixedWidth for Button {
|
||||||
///
|
///
|
||||||
/// Button::new("button_id", "Click me!")
|
/// Button::new("button_id", "Click me!")
|
||||||
/// .width(px(100.).into())
|
/// .width(px(100.).into())
|
||||||
/// .on_click(|event, cx| {
|
/// .on_click(|event, window, cx| {
|
||||||
/// // Handle click event
|
/// // Handle click event
|
||||||
/// });
|
/// });
|
||||||
/// ```
|
/// ```
|
||||||
|
@ -339,7 +339,7 @@ impl FixedWidth for Button {
|
||||||
///
|
///
|
||||||
/// Button::new("button_id", "Click me!")
|
/// Button::new("button_id", "Click me!")
|
||||||
/// .full_width()
|
/// .full_width()
|
||||||
/// .on_click(|event, cx| {
|
/// .on_click(|event, window, cx| {
|
||||||
/// // Handle click event
|
/// // Handle click event
|
||||||
/// });
|
/// });
|
||||||
/// ```
|
/// ```
|
||||||
|
@ -383,7 +383,7 @@ impl ButtonCommon for Button {
|
||||||
///
|
///
|
||||||
/// Button::new("button_id", "Click me!")
|
/// Button::new("button_id", "Click me!")
|
||||||
/// .tooltip(Tooltip::text_f("This is a tooltip", cx))
|
/// .tooltip(Tooltip::text_f("This is a tooltip", cx))
|
||||||
/// .on_click(|event, cx| {
|
/// .on_click(|event, window, cx| {
|
||||||
/// // Handle click event
|
/// // Handle click event
|
||||||
/// });
|
/// });
|
||||||
/// ```
|
/// ```
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue