Refactor Title And Loading
This commit is contained in:
parent
8845db8993
commit
f8c9888d80
10 changed files with 76 additions and 100 deletions
14
src/app/components/loading.rs
Normal file
14
src/app/components/loading.rs
Normal 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>
|
||||
}
|
||||
}
|
|
@ -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};
|
16
src/app/components/title.rs
Normal file
16
src/app/components/title.rs
Normal 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>
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue