pub struct ButtonProps {
pub children: Element,
pub variant: ButtonVariant,
pub size: Option<ButtonSize>,
pub disabled: bool,
pub round: bool,
pub circle: bool,
pub loading: bool,
pub icon: Option<String>,
pub button_type: String,
pub on_click: Option<EventHandler<MouseEvent>>,
pub class: Option<String>,
pub style: Option<String>,
}Expand description
Button props for the theme-chalk styled button component
Fields§
§children: ElementButton content
variant: ButtonVariantButton variant/style
size: Option<ButtonSize>Button size
disabled: boolWhether the button is disabled
round: boolWhether the button is round
circle: boolWhether the button is circle
loading: boolWhether the button is loading
icon: Option<String>Button icon (CSS class name)
Native button type
on_click: Option<EventHandler<MouseEvent>>Click event handler
class: Option<String>Additional CSS classes
style: Option<String>Inline styles
Implementations§
Source§impl ButtonProps
impl ButtonProps
Sourcepub fn builder() -> ButtonPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> ButtonPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building ButtonProps.
On the builder, call .children(...)(optional), .variant(...)(optional), .size(...)(optional), .disabled(...)(optional), .round(...)(optional), .circle(...)(optional), .loading(...)(optional), .icon(...)(optional), .button_type(...)(optional), .on_click(...)(optional), .class(...)(optional), .style(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of ButtonProps.
Trait Implementations§
Source§impl Clone for ButtonProps
impl Clone for ButtonProps
Source§fn clone(&self) -> ButtonProps
fn clone(&self) -> ButtonProps
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl PartialEq for ButtonProps
impl PartialEq for ButtonProps
Source§fn eq(&self, other: &ButtonProps) -> bool
fn eq(&self, other: &ButtonProps) -> bool
self and other values to be equal, and is used by ==.