tallyweb_components/
saving_screen.rs

1use super::*;
2use leptos::*;
3
4#[component]
5pub fn SavingMessage() -> impl IntoView {
6    view! {
7        <div style="display: flex; align-items: center;">
8            <Spinner />
9            <b style="font-size: 20px; padding-left: 24px;">Saving</b>
10        </div>
11    }
12}
13
14#[component]
15pub fn SavingSuccess() -> impl IntoView {
16    view! {
17        <div style="display: flex; align-items: center; font-size: 20px">
18            <i class="fa-solid fa-check"></i>
19            <b style="padding-left: 24px;">Saved</b>
20        </div>
21    }
22}
23
24#[component]
25pub fn SavingScreen(#[prop(optional)] accent_color: Option<Signal<String>>) -> impl IntoView {
26    let border_style = move || {
27        format!(
28            "2px solid {};",
29            accent_color.map(|ac| ac()).unwrap_or_default()
30        )
31    };
32
33    view! {
34        <div class="notification-box" style:border=border_style>
35            <SavingMessage />
36        </div>
37    }
38}