Struct dioxus_material::ButtonProps
source · pub struct ButtonProps<'a> {
pub onpress: EventHandler<'a, Event<MouseData>>,
pub children: Element<'a>,
pub background_color: Option<&'a str>,
pub border_radius: Option<&'a str>,
pub height: Option<&'a str>,
}
Fields§
§onpress: EventHandler<'a, Event<MouseData>>
Handler for button press events.
children: Element<'a>
Label child element.
background_color: Option<&'a str>
Background color of the container (optional).
border_radius: Option<&'a str>
Border radius of the container (optional).
height: Option<&'a str>
Height of the container (optional).
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 .onpress(...)
, .children(...)
(optional), .background_color(...)
(optional), .border_radius(...)
(optional), .height(...)
(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