Refactor Title And Loading

This commit is contained in:
Florian RICHER 2023-12-09 16:49:05 +01:00
parent 8845db8993
commit f8c9888d80
10 changed files with 76 additions and 100 deletions

View file

@ -0,0 +1,14 @@
use leptos::*;
#[component]
pub fn Loading(
#[prop[optional]]
title: Option<String>
) -> impl IntoView {
view! {
<div class="loading">
<h1>{title}</h1>
<span></span>
</div>
}
}

View file

@ -23,5 +23,12 @@ mod timeline;
pub use timeline::{Timeline, TimelineElement, TimelineLabel, TimelineCard, TimelineCardTag, TimelineCardContent, TimelineCardSummary};
mod mon_parcours;
mod loading;
pub use loading::Loading;
mod title;
pub use title::Title;
pub use mon_parcours::{MonParcours};

View file

@ -0,0 +1,16 @@
use leptos::*;
#[component]
pub fn Title(
href: String,
#[prop[optional]]
title: Option<String>
) -> impl IntoView {
view! {
<header>
<a href=href>r"< Retour"</a>
<h1>{title}</h1>
<span></span>
</header>
}
}