Struct dioxus_material::TextButtonProps
source · pub struct TextButtonProps<'a> {
pub onpress: EventHandler<'a, Event<MouseData>>,
pub children: Element<'a>,
pub border_radius: Option<&'a str>,
pub color: 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.
border_radius: Option<&'a str>
Border radiusof the container (optional).
color: Option<&'a str>
Text color (optional).
height: Option<&'a str>
Height of the container (optional).
Implementations§
source§impl<'a> TextButtonProps<'a>
impl<'a> TextButtonProps<'a>
sourcepub fn builder() -> TextButtonPropsBuilder<'a, ((), (), (), (), ())>
pub fn builder() -> TextButtonPropsBuilder<'a, ((), (), (), (), ())>
Create a builder for building TextButtonProps
.
On the builder, call .onpress(...)
, .children(...)
(optional), .border_radius(...)
(optional), .color(...)
(optional), .height(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of TextButtonProps
.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for TextButtonProps<'a>
impl<'a> !Send for TextButtonProps<'a>
impl<'a> !Sync for TextButtonProps<'a>
impl<'a> Unpin for TextButtonProps<'a>
impl<'a> !UnwindSafe for TextButtonProps<'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