Struct freya_components::ButtonProps
source · pub struct ButtonProps<'a> {
pub padding: String,
pub margin: String,
pub corner_radius: String,
pub width: String,
pub height: String,
pub children: Element<'a>,
pub onclick: Option<EventHandler<'a, MouseEvent>>,
}Expand description
Button component properties.
Fields§
§padding: StringPadding for the Button.
margin: StringMargin for the Button.
corner_radius: StringCorner radius for the Button.
width: StringWidth size for the Button.
height: StringInner children for the Button.
children: Element<'a>Inner children for the Button.
onclick: Option<EventHandler<'a, MouseEvent>>Handler for the onclick event.
Implementations§
source§impl<'a> ButtonProps<'a>
impl<'a> ButtonProps<'a>
sourcepub fn builder() -> ButtonPropsBuilder<'a, ((), (), (), (), (), (), ())>
pub fn builder() -> ButtonPropsBuilder<'a, ((), (), (), (), (), (), ())>
Create a builder for building ButtonProps.
On the builder, call .padding(...)(optional), .margin(...)(optional), .corner_radius(...)(optional), .width(...)(optional), .height(...)(optional), .children(...)(optional), .onclick(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of ButtonProps.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ButtonProps<'a>
impl<'a> !Send for ButtonProps<'a>
impl<'a> !Sync for ButtonProps<'a>
impl<'a> Unpin for ButtonProps<'a>
impl<'a> !UnwindSafe for ButtonProps<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more