pub enum Variant {
    None,
    Primary,
    Secondary,
    Tertiary,
    Warning,
    Danger,
    DangerSecondary,
    Link,
    InlineLink,
    Control,
    Plain,
}

Variants§

§

None

§

Primary

§

Secondary

§

Tertiary

§

Warning

§

Danger

§

DangerSecondary

§

Control

§

Plain

Implementations§

Examples found in repository?
src/button.rs (line 172)
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
    fn view(&self, ctx: &Context<Self>) -> Html {
        let mut classes: Classes = classes!(
            "pf-c-button",
            ctx.props().class.clone(),
            ctx.props().variant.as_classes()
        );

        if ctx.props().expanded {
            classes.push("pf-m-expanded");
        }
        if ctx.props().block {
            classes.push("pf-m-block");
        }
        if ctx.props().loading {
            classes.push("pf-m-progress pf-m-in-progress")
        }

        return html! {
            <button
                ref={self.node_ref.clone()}
                id={ctx.props().id.clone()}
                class={classes}
                style={ctx.props().style.clone()}
                disabled={ctx.props().disabled}
                type={ctx.props().r#type.clone()}
                onclick={ctx.link().callback(Msg::Clicked)}
                role={ctx.props().role.clone()}
                form={ctx.props().form.clone()}
                formaction={ctx.props().formaction.clone()}
            >
                if ctx.props().loading {
                    <span class="pf-c-button__progress">
                        <Spinner size={SpinnerSize::Md} />
                    </span>
                }

                { self.label(ctx) }
                { for ctx.props().children.iter() }

            </button>
        };
    }

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Convert self to a value of a Properties struct.
Convert self to a value of a Properties struct.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more