pub fn primary_button(
id: impl Into<ElementId>,
label: &str,
enabled: bool,
cx: &App,
) -> Stateful<Div>Expand description
Create a primary button with the specified label
The button is styled using the theme’s primary colors when enabled, and disabled colors when not enabled. Buttons are focusable tab stops that can be activated with Enter or Space.
§Arguments
id- Element ID for the button (required for click handlers)label- The text to display on the buttonenabled- Whether the button is enabled (affects styling and cursor)cx- Application context to access the theme
§Returns
A focusable Stateful<Div> that can be composed with .on_click() and other handlers.