MCPcopy Create free account
hub / github.com/DioxusLabs/dioxus-components / BlockInbox

Function BlockInbox

preview/src/main.rs:1755–1792  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1753
1754#[component]
1755fn BlockInbox() -> Element {
1756 let messages: &[(&str, &str, &str)] = &[
1757 ("Sarah Chen", "Left 3 comments on the auth flow", "2m"),
1758 ("Marcus Wright", "Roadmap sync notes attached", "1h"),
1759 ("Lena Park", "Refactored the sidebar layout", "4h"),
1760 ];
1761 rsx! {
1762 div { style: "display: flex; align-items: center; gap: 0.55rem; margin-bottom: 0.85rem;",
1763 div { style: "flex: 1;",
1764 h3 { style: "margin: 0; font-size: 1rem; font-weight: 660; color: var(--secondary-color-3);", "Inbox" }
1765 p { style: "margin: 0; color: var(--secondary-color-5); font-size: 0.85rem;", "3 new conversations." }
1766 }
1767 Badge { variant: BadgeVariant::Secondary, "3" }
1768 }
1769 div { style: "display: grid; gap: 0.5rem;",
1770 for (sender , preview , time) in messages.iter() {
1771 Item { variant: ItemVariant::Outline,
1772 ItemMedia { variant: ItemMediaVariant::Icon,
1773 ImageAvatar {
1774 size: AvatarImageSize::Small,
1775 src: "https://avatar.vercel.sh/{sender}",
1776 alt: "{sender}",
1777 aria_label: "{sender}",
1778 "{sender.chars().next().unwrap_or('?')}"
1779 }
1780 }
1781 ItemContent {
1782 ItemTitle { "{sender}" }
1783 ItemDescription { "{preview}" }
1784 }
1785 ItemContent { flex: "none",
1786 ItemDescription { "{time}" }
1787 }
1788 }
1789 }
1790 }
1791 }
1792}
1793
1794#[component]
1795fn BlockTasks() -> Element {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected