use leptos::*; use leptos_icons::FaIcon::FaCaretDownSolid; use leptos_icons::*; #[component] pub fn Timeline( #[prop(default = vec![])] elements: Vec, ) -> impl IntoView { view! {
} } #[slot] pub struct TimelineLabel { children: ChildrenFn, } impl IntoView for TimelineLabel { fn into_view(self) -> View { let view = view! { <>{ (self.children)() } }; view.into_view() } } #[slot] pub struct TimelineElement { #[prop(default = vec![])] labels: Vec, #[prop(default = vec![])] cards: Vec, } impl IntoView for TimelineElement { fn into_view(self) -> View { let view = view! {
  • { self.labels.collect_view() }
    { self.cards.collect_view() }
  • }; view.into_view() } } #[slot] pub struct TimelineCardContent { children: ChildrenFn, } impl IntoView for TimelineCardContent { fn into_view(self) -> View { let view = view! { <>{ (self.children)() } }; view.into_view() } } #[slot] pub struct TimelineCardTag { children: ChildrenFn, } impl IntoView for TimelineCardTag { fn into_view(self) -> View { let view = view! { <> { (self.children)() } }; view.into_view() } } #[slot] pub struct TimelineCardSummary { #[prop(default = vec![])] tags: Vec, children: ChildrenFn, } impl IntoView for TimelineCardSummary { fn into_view(self) -> View { let view = view! { <> { (self.children)() } { view! {
    { self.tags.collect_view() }
    } } }; view.into_view() } } #[slot] pub struct TimelineCard { #[prop(default = vec![])] titles: Vec, #[prop(default = vec![])] cards: Vec, } impl IntoView for TimelineCard { fn into_view(self) -> View { let view = view! {
    { self.titles.collect_view() }
    { self.cards.collect_view() }
    }; view.into_view() } }