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::PurpleBlue => "bg-purple-900",
|
||||||
Gradient::Orange => "bg-orange-900",
|
Gradient::Orange => "bg-orange-900",
|
||||||
Gradient::Pink => "bg-pink-900",
|
Gradient::Pink => "bg-pink-900",
|
||||||
Gradient::PinkRed => "bg-red-900",
|
Gradient::PinkRed => "bg-fuchsia-950",
|
||||||
};
|
};
|
||||||
|
|
||||||
c.push(' ');
|
c.push(' ');
|
||||||
|
@ -225,7 +225,7 @@ fn View() -> impl IntoView {
|
|||||||
|
|
||||||
<Separator />
|
<Separator />
|
||||||
|
|
||||||
<div class="flex flex-row justify-around">
|
<div class="flex flex-row justify-between">
|
||||||
<NextProblemButton />
|
<NextProblemButton />
|
||||||
</div>
|
</div>
|
||||||
</Section>
|
</Section>
|
||||||
@ -241,7 +241,7 @@ fn View() -> impl IntoView {
|
|||||||
</Section>
|
</Section>
|
||||||
</div>
|
</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 />
|
<HoldsButton />
|
||||||
</div>
|
</div>
|
||||||
</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]
|
#[component]
|
||||||
#[tracing::instrument(skip_all)]
|
#[tracing::instrument(skip_all)]
|
||||||
fn HoldsButton() -> impl IntoView {
|
fn HoldsButton() -> impl IntoView {
|
||||||
@ -333,7 +343,8 @@ fn FavoriteButton() -> impl IntoView {
|
|||||||
ctx.cb_set_is_favorite.run(!ui_toggle.get());
|
ctx.cb_set_is_favorite.run(!ui_toggle.get());
|
||||||
});
|
});
|
||||||
let icon = Signal::derive(move || if ui_toggle.get() { Icon::Heart } else { Icon::HeartOutline });
|
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]
|
#[component]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user