pub struct stat;Expand description
One figure for a dashboard: what it counts, the value, and an optional line under it. With an
href the whole tile is a link, such as to the list the figure counts.
Lay several out in a grid of your own:
view! {
cx =>
<div class="grid gap-4 sm:grid-cols-2 xl:grid-cols-4">
stat(
label: "Posts",
value: "66",
detail: "65 drafts",
icon: icons::FILE_TEXT,
href: "/admin/posts".to_string(),
)
stat(label: "Comments", value: "4")
</div>
}Trait Implementations§
Source§impl Component for stat
impl Component for stat
Source§type Props<'__props> = StatProps
type Props<'__props> = StatProps
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§
impl Freeze for stat
impl RefUnwindSafe for stat
impl Send for stat
impl Sync for stat
impl Unpin for stat
impl UnsafeUnpin for stat
impl UnwindSafe for stat
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