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

Function BlockFilters

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

Source from the content-addressed store, hash-verified

1555
1556#[component]
1557fn BlockFilters() -> Element {
1558 rsx! {
1559 div { style: "display: grid; gap: 0.3rem; margin-bottom: 1rem;",
1560 h3 { style: "margin: 0; font-size: 1rem; font-weight: 660; color: var(--secondary-color-3);", "Filter results" }
1561 p { style: "margin: 0; color: var(--secondary-color-5); font-size: 0.85rem;", "Narrow down what's shown below." }
1562 }
1563 div { style: "display: grid; gap: 1.1rem;",
1564 div { style: "display: grid; gap: 0.45rem;",
1565 span { style: "color: var(--secondary-color-5); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;",
1566 "Status"
1567 }
1568 RadioGroup { default_value: "active".to_string(),
1569 RadioItem { value: "active".to_string(), index: 0usize, "Active" }
1570 RadioItem { value: "draft".to_string(), index: 1usize, "Drafts" }
1571 RadioItem { value: "archived".to_string(), index: 2usize, "Archived" }
1572 }
1573 }
1574 div { style: "display: grid; gap: 0.45rem;",
1575 span { style: "color: var(--secondary-color-5); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;",
1576 "Tags"
1577 }
1578 div { style: "display: grid; gap: 0.4rem;",
1579 for tag in [("ft-design", "Design", true), ("ft-eng", "Engineering", false), ("ft-research", "Research", false)] {
1580 div { style: "display: flex; align-items: center; gap: 0.55rem;",
1581 Checkbox {
1582 id: tag.0,
1583 name: tag.0,
1584 default_checked: if tag.2 { dioxus_primitives::checkbox::CheckboxState::Checked } else { dioxus_primitives::checkbox::CheckboxState::Unchecked },
1585 aria_label: tag.1,
1586 }
1587 Label { html_for: tag.0, "{tag.1}" }
1588 }
1589 }
1590 }
1591 }
1592 Button { style: "width: 100%; margin-top: 0.2rem;", "Apply filters" }
1593 }
1594 }
1595}
1596
1597#[component]
1598fn BlockColorPalette() -> Element {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected