pub struct button;Expand description
A styled button.
variant defaults to Primary and size to Md. Pass the content as children.
attrs are forwarded to the <button>, with extra classes added to its classes.
Use button_variants to apply the same styling to another element.
ⓘ
view! {
button(
variant: ButtonVariant::Destructive,
attrs: attributes! { type="submit" },
"Delete"
)
}Trait Implementations§
Source§type Props<'__props> = ButtonProps<'__props>
type Props<'__props> = ButtonProps<'__props>
The component’s properties. The lifetime covers data borrowed from
the caller.
Source§fn render<'__a, '__props>(
self,
cx: &'__a Cx,
props: Self::Props<'__props>,
) -> impl Future<Output = Result<impl View>> + Send + '__awhere
Self: '__a,
Self::Props<'__props>: '__a,
'__props: '__a,
fn render<'__a, '__props>(
self,
cx: &'__a Cx,
props: Self::Props<'__props>,
) -> impl Future<Output = Result<impl View>> + Send + '__awhere
Self: '__a,
Self::Props<'__props>: '__a,
'__props: '__a,
fn props_builder<'a>() -> <Self::Props<'a> as Props>::Builder
Auto Trait Implementations§
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