diff --git a/src/app/components/timeline.rs b/src/app/components/timeline.rs index 48f4cc7..da5e516 100644 --- a/src/app/components/timeline.rs +++ b/src/app/components/timeline.rs @@ -15,22 +15,42 @@ pub fn Timeline( } } +#[slot] +pub struct TimelineCardContent { + children: ChildrenFn, +} + +#[slot] +pub struct TimelineCardSummary { + children: ChildrenFn, + tags: ChildrenFn, +} + #[component] -pub fn TimelineCard( - titles: F, - children: Children, -) -> impl IntoView - where - F: Fn() -> IV, - IV: IntoView, -{ +pub fn TimelineCard( + #[prop(default=vec![])] titles: Vec, + #[prop(default=vec![])] childrens: Vec, +) -> impl IntoView { view! {
- { titles() } + { + titles.iter().map(|v| view! { + <> + { (v.children)() } + { + view! { +
+ { (v.tags)() } +
+ } + } + + }).collect_view() + }
-
{ children() }
+
{ childrens.iter().map(|v| (v.children)()).collect_view() }
} } \ No newline at end of file