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: Option<VNode<'a>>,
pub onclick: Option<EventHandler<'a, Event<MouseData>>>,
}
Expand description
Button
component properties.
Fields§
§padding: String
Padding for the Button.
margin: String
Margin for the Button.
corner_radius: String
Corner radius for the Button.
width: String
Width size for the Button.
height: String
Inner children for the Button.
children: Option<VNode<'a>>
Inner children for the Button.
onclick: Option<EventHandler<'a, Event<MouseData>>>
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§
source§impl<'a> Properties for ButtonProps<'a>
impl<'a> Properties for ButtonProps<'a>
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