Trait ButtonModifiers
pub trait ButtonModifiers {
// Required method
fn variant<U>(self, variant: impl Res<U>) -> Self
where U: Into<ButtonVariant>;
}Expand description
Modifiers for changing the appearance of buttons.
Required Methods§
fn variant<U>(self, variant: impl Res<U>) -> Selfwhere
U: Into<ButtonVariant>,
fn variant<U>(self, variant: impl Res<U>) -> Selfwhere
U: Into<ButtonVariant>,
Selects the style variant to be used by the button or button group.
§Example
Button::new(cx, |cx| Label::new(cx, "Text"))
.variant(ButtonVariant::Accent);Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.