vizia::views

Trait ButtonModifiers

Source
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§

Source

fn variant<U>(self, variant: impl Res<U>) -> Self
where 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.

Implementors§