pub fn Button(_: ButtonProps) -> ElementExpand description
The variant is the seam the design system’s component rule attaches to. The same rsx draws differently per system, and that is correct behaviour.
§Props
For details, see the props struct definition.
weight:Option<f32>width:Option<f32>height:Option<f32>padding:Option<f32>padding_role:Option<SpaceRole>background:Option<Paint>shape_role:Option<ShapeRole>corner_radius:Option<f32>border_width:Option<f32>border_color:Option<Paint>elevation:Option<f32>fill_max_width:boolfill_max_height:booltext:Stringicon:Option<IconRole>The meaning of the glyph on it, never a picture:
IconRole::Searchcomes out as this design system’s search icon.With a
textbeside it the button shows both. Withtextempty it is the glyph alone, which is what every one of the reference toolbars is made of, and the role is what names it for assistive technology.enabled:boolvariant:Option<ButtonVariant>color:Option<Paint>The label’s colour, for the rare button whose meaning is not the variant’s. A destructive action is the case that needs it: it is a plain button in every design system, and what marks it is that its label is the error colour.
on_click:EventHandler<()>