Struct freya::components::ButtonProps
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: 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: Option<VNode<'a>>Inner children for the Button.
onclick: Option<EventHandler<'a, Event<MouseData>>>Handler for the onclick event.
Implementations§
§impl<'a> ButtonProps<'a>
impl<'a> ButtonProps<'a>
pub 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§
§impl<'a> Properties for ButtonProps<'a>
impl<'a> Properties for ButtonProps<'a>
§type Builder = ButtonPropsBuilder<'a, ((), (), (), (), (), (), ())>
type Builder = ButtonPropsBuilder<'a, ((), (), (), (), (), (), ())>
The type of the builder for this component.
Used to create “in-progress” versions of the props.
§fn builder() -> <ButtonProps<'a> as Properties>::Builder
fn builder() -> <ButtonProps<'a> as Properties>::Builder
Create a builder for this component.
§unsafe fn memoize(&self, other: &ButtonProps<'a>) -> bool
unsafe fn memoize(&self, other: &ButtonProps<'a>) -> bool
Memoization can only happen if the props are valid for the ’static lifetime Read more
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