save/saved text
This commit is contained in:
parent
dea8c45939
commit
27716c5ec0
@ -29,7 +29,7 @@ pub fn OutlinedBox(children: Children, color: Gradient, #[prop(optional)] highli
|
||||
Gradient::PurpleBlue => "bg-purple-900",
|
||||
Gradient::Orange => "bg-orange-900",
|
||||
Gradient::Pink => "bg-pink-900",
|
||||
Gradient::PinkRed => "bg-red-900",
|
||||
Gradient::PinkRed => "bg-fuchsia-950",
|
||||
};
|
||||
|
||||
c.push(' ');
|
||||
|
@ -225,7 +225,7 @@ fn View() -> impl IntoView {
|
||||
|
||||
<Separator />
|
||||
|
||||
<div class="flex flex-row justify-around">
|
||||
<div class="flex flex-row justify-between">
|
||||
<NextProblemButton />
|
||||
</div>
|
||||
</Section>
|
||||
@ -241,7 +241,7 @@ fn View() -> impl IntoView {
|
||||
</Section>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-row flex-auto justify-end items-start px-2 pt-3">
|
||||
<div class="flex flex-col px-2 pt-3 gap-4">
|
||||
<HoldsButton />
|
||||
</div>
|
||||
</div>
|
||||
@ -302,6 +302,16 @@ fn Transformations() -> impl IntoView {
|
||||
}
|
||||
}
|
||||
|
||||
#[component]
|
||||
#[tracing::instrument(skip_all)]
|
||||
fn LikedButton() -> impl IntoView {
|
||||
crate::tracing::on_enter!();
|
||||
|
||||
let ctx = use_context::<Context>().unwrap();
|
||||
|
||||
view! { <Button text="Saved" icon=Icon::HeartOutline color=Gradient::PinkRed /> }
|
||||
}
|
||||
|
||||
#[component]
|
||||
#[tracing::instrument(skip_all)]
|
||||
fn HoldsButton() -> impl IntoView {
|
||||
@ -333,7 +343,8 @@ fn FavoriteButton() -> impl IntoView {
|
||||
ctx.cb_set_is_favorite.run(!ui_toggle.get());
|
||||
});
|
||||
let icon = Signal::derive(move || if ui_toggle.get() { Icon::Heart } else { Icon::HeartOutline });
|
||||
view! { <Button icon on_click color=Gradient::PurplePink highlight=ui_toggle /> }
|
||||
let text = Signal::derive(move || if ui_toggle.get() { "Saved" } else { "Save" }.to_string());
|
||||
view! { <Button text icon on_click color=Gradient::PinkRed /> }
|
||||
}
|
||||
|
||||
#[component]
|
||||
|
Loading…
x
Reference in New Issue
Block a user