-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into update-wallet-page
- Loading branch information
Showing
16 changed files
with
635 additions
and
309 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
use leptos::*; | ||
|
||
#[component] | ||
pub fn HighlightedButton( | ||
children: Children, | ||
on_click: impl Fn() + 'static, | ||
#[prop(optional)] classes: String, | ||
#[prop(optional)] alt_style: Signal<bool>, | ||
#[prop(optional)] disabled: Signal<bool>, | ||
) -> impl IntoView { | ||
let on_click = move |_| on_click(); | ||
view! { | ||
<button | ||
on:click=on_click | ||
disabled=move ||disabled.get() | ||
class=move || format!( | ||
"w-full px-5 py-3 rounded-lg disabled:text-white/50 flex items-center transition-all justify-center gap-8 font-kumbh font-bold {} {}", | ||
if alt_style.get() { | ||
"text-primary-600" | ||
} else { | ||
"text-white" | ||
}, | ||
classes, | ||
) | ||
style=move || format!( | ||
"background: linear-gradient(73deg, {} );", | ||
if disabled.get() { | ||
"#DE98BE 0%, #E761A9 33%, #7B5369 100%" | ||
} else if alt_style.get() { | ||
"#FFF 0%, #FFF 1000%" | ||
} else { | ||
"#DA539C 0%, #E2017B 33%, #5F0938 100%" | ||
}, | ||
) | ||
> | ||
{children()} | ||
</button> | ||
} | ||
} | ||
|
||
#[component] | ||
pub fn HighlightedLinkButton( | ||
children: Children, | ||
href: String, | ||
#[prop(optional)] classes: String, | ||
#[prop(optional)] alt_style: Signal<bool>, | ||
#[prop(optional)] disabled: Signal<bool>, | ||
) -> impl IntoView { | ||
view! { | ||
<a | ||
href=href | ||
disabled=move || disabled.get() | ||
class=move ||format!( | ||
"w-full px-5 py-3 rounded-lg {} disabled:text-white/50 flex items-center transition-all justify-center gap-8 font-kumbh font-bold {}", | ||
if alt_style.get() { | ||
"text-primary-600" | ||
} else { | ||
"text-white" | ||
}, | ||
classes, | ||
) | ||
style=move || format!( | ||
"background: linear-gradient(73deg, {} );", | ||
if disabled.get() { | ||
"#DE98BE 0%, #E761A9 33%, #7B5369 100%" | ||
} else if alt_style.get() { | ||
"#FFF 0%, #FFF 1000%" | ||
} else { | ||
"#DA539C 0%, #E2017B 33%, #5F0938 100%" | ||
}, | ||
) | ||
> | ||
{children()} | ||
</a> | ||
} | ||
} | ||
|
||
#[component] | ||
pub fn SecondaryHighlightedLinkButton( | ||
children: Children, | ||
href: String, | ||
#[prop(optional)] classes: String, | ||
#[prop(optional)] alt_style: Signal<bool>, | ||
) -> impl IntoView { | ||
view! { | ||
<a | ||
href=href | ||
class=move || format!( | ||
"rounded-full border border-white text-sm font-bold font-kumbh px-5 py-2 {} {}", | ||
if alt_style.get() { | ||
"bg-transparent text-white hover:bg-white/10 active:bg-white/5" | ||
} else { | ||
"bg-white text-black" | ||
}, | ||
classes, | ||
) | ||
> | ||
{children()} | ||
</a> | ||
} | ||
} | ||
|
||
#[component] | ||
pub fn SecondaryHighlightedButton( | ||
children: Children, | ||
disabled: Signal<bool>, | ||
alt_style: Signal<bool>, | ||
classes: String, | ||
on_click: impl Fn() + 'static, | ||
) -> impl IntoView { | ||
let on_click = move |_| on_click(); | ||
view! { | ||
<button | ||
disabled=move || disabled.get() | ||
on:click=on_click | ||
class=move ||format!( | ||
"rounded-full border border-white text-sm font-bold font-kumbh px-5 py-2 {} {}", | ||
if alt_style.get() { | ||
"bg-transparent text-white hover:bg-white/10 active:bg-white/5" | ||
} else { | ||
"bg-white text-black" | ||
}, | ||
classes, | ||
) | ||
> | ||
|
||
{children()} | ||
</button> | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,11 @@ | ||
use leptos::*; | ||
use crate::utils::icon::icon_gen; | ||
|
||
#[component] | ||
pub fn ChevronRightIcon( | ||
#[prop(optional, default = "w-full h-full".to_string())] classes: String, | ||
) -> impl IntoView { | ||
view! { | ||
<svg | ||
class=format!("{}", classes) | ||
viewBox="0 0 30 30" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
icon_gen!( | ||
ChevronRightIcon, | ||
view_box = "0 0 30 30", | ||
r###"<path | ||
d="M12.1224 24.0156C11.7522 24.3858 11.1518 24.3858 10.7815 24.0156V24.0156C10.4113 23.6453 10.4113 23.0449 10.7815 22.6746L17.891 15.5652L10.7815 8.45569C10.4113 8.08541 10.4113 7.48507 10.7815 7.11479V7.11479C11.1518 6.74451 11.7522 6.74451 12.1224 7.11479L19.8657 14.8581C20.2562 15.2486 20.2562 15.8818 19.8657 16.2723L12.1224 24.0156Z" | ||
fill="currentColor" | ||
/> | ||
</svg> | ||
} | ||
} | ||
/>"### | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
use leptos::*; | ||
|
||
#[component] | ||
pub fn EyeHiddenIcon( | ||
#[prop(optional, default = "w-full h-full".to_string())] classes: String, | ||
) -> impl IntoView { | ||
view! { | ||
<svg | ||
class=format!("{}", classes) | ||
viewBox="0 0 37 23" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
d="M13.83 16.4851L13.8288 16.4828L24.9494 9.17546L31.3754 4.95298L31.3743 4.95183L34.1739 3.11239C34.3262 3.01147 34.4315 2.85436 34.4693 2.67661C34.5048 2.49771 34.4693 2.31193 34.3708 2.15826L33.8682 1.3922C33.7365 1.19151 33.5166 1.08257 33.2934 1.08257C33.164 1.08257 33.0311 1.11812 32.9155 1.19495L29.4117 3.49771C26.0682 1.24541 22.3456 0 18.5006 0C11.5467 0 4.93757 3.95069 0.370001 10.8383C0.115802 11.2213 0.115802 11.7144 0.370001 12.0975C2.11161 14.7236 4.15665 16.9071 6.39864 18.6216L2.82497 20.9702C2.67268 21.0711 2.56733 21.2282 2.52955 21.406C2.49405 21.5849 2.52955 21.7706 2.62802 21.9243L3.13069 22.6904C3.26237 22.8911 3.48222 23 3.70551 23C3.83489 23 3.96772 22.9644 4.08337 22.8876L8.43567 20.0275C8.43567 20.0287 8.43681 20.0287 8.43681 20.0287L13.83 16.4851ZM11.6292 11.4679C11.6292 7.67316 14.7105 4.58716 18.4994 4.58716C20.659 4.58716 22.5666 5.60436 23.8193 7.17316L12.4525 14.6433C11.9441 13.6904 11.6292 12.6227 11.6292 11.4679Z" | ||
fill="currentColor" | ||
/> | ||
<path | ||
d="M36.63 10.8383C35.5697 9.23855 34.3891 7.81538 33.1296 6.54474L25.3502 11.6583C25.2483 15.3624 22.2231 18.3486 18.4994 18.3486C17.5937 18.3486 16.7326 18.1629 15.9402 17.8429L10.7624 21.2454C13.2288 22.3463 15.8372 22.9358 18.5005 22.9358C25.4567 22.9358 32.0658 18.9851 36.63 12.0975C36.8842 11.7145 36.8842 11.2213 36.63 10.8383Z" | ||
fill="currentColor" | ||
/> | ||
</svg> | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.