Insight note
An amethyst-tinted summary with the mark, a label and the sources it came from. Say where each figure comes from.
Summary
Nine of twelve interviewees raised onboarding. The September export has 410 fewer tickets than the August summary, so two figures need checking.
interviews-q3.pdftickets-sept.csv
Weekly digest
Three projects moved to ready. One is waiting on a review from Amara Kaur.
Usage
use hydroxy_leptos::insight_note::InsightNote;
use leptos::prelude::*;
#[component]
pub fn Demo() -> impl IntoView {
view! {
<div style="display: grid; gap: var(--space-5); max-width: 520px;">
<InsightNote sources=vec!["interviews-q3.pdf".to_string(), "tickets-sept.csv".to_string()]>
<p>
"Nine of twelve interviewees raised onboarding. The September export has 410 fewer tickets than the August summary, so two figures need checking."
</p>
</InsightNote>
<InsightNote label="Weekly digest">
<p>"Three projects moved to ready. One is waiting on a review from Amara Kaur."</p>
</InsightNote>
</div>
}
}use dioxus::prelude::*;
use hydroxy_dioxus::insight_note::InsightNote;
#[component]
pub fn InsightNoteDemo() -> Element {
rsx! {
div { style: "display: grid; gap: var(--space-5); max-width: 520px;",
InsightNote { sources: vec!["interviews-q3.pdf".to_string(), "tickets-sept.csv".to_string()],
p {
"Nine of twelve interviewees raised onboarding. The September export has 410 fewer tickets than the August summary, so two figures need checking."
}
}
InsightNote { label: "Weekly digest",
p { "Three projects moved to ready. One is waiting on a review from Amara Kaur." }
}
}
}
}
Anatomy
| Component | data-part | Renders |
|---|---|---|
InsightNote | — | section labelled by `label` |
| head | The mark, the label and an optional action |
| body | Your content |
| sources | SourceRow of SourceChips |
Props
| Prop | Type | Notes |
|---|---|---|
label | String | What the note is. Default Summary |
sources | Vec<String> | File names shown as source chips |
action | View | Control at the end of the header |
children | View | The note |