Trait vizia::views::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);

Object Safety§

This trait is not object safe.

Implementors§