Skip to content

Commit

Permalink
added button names and color pallete for text
Browse files Browse the repository at this point in the history
  • Loading branch information
joel-medicala-yral committed Dec 16, 2024
1 parent aa2b2f8 commit 3079ce6
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 21 deletions.
25 changes: 11 additions & 14 deletions ssr/src/component/buttons.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use leptos::*;

#[component]
pub fn Button(
pub fn HighlightedButton(
children: Children,
on_click: impl Fn() + 'static,
#[prop(optional)] classes: String,
Expand All @@ -14,11 +14,9 @@ pub fn Button(
on:click=on_click
disabled=disabled.get()
class=format!(
"w-full px-5 py-3 rounded-lg flex items-center transition-all justify-center gap-8 font-kumbh font-bold {} {}",
if disabled.get() {
"text-white/50"
} else if alt_style.get() {
"text-[#E2017B]"
"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"
},
Expand All @@ -41,7 +39,7 @@ pub fn Button(
}

#[component]
pub fn LinkButton(
pub fn HighlightedLinkButton(
children: Children,
href: String,
#[prop(optional)] classes: String,
Expand All @@ -51,12 +49,11 @@ pub fn LinkButton(
view! {
<a
href=href
disabled=disabled.get()
class=format!(
"w-full px-5 py-3 rounded-lg flex items-center transition-all justify-center gap-8 font-kumbh font-bold {} {}",
if disabled.get() {
"text-white/50"
} else if alt_style.get() {
"text-[#E2017B]"
"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"
},
Expand All @@ -79,7 +76,7 @@ pub fn LinkButton(
}

#[component]
pub fn SecondaryLinkButton(
pub fn SecondaryHighlightedLinkButton(
children: Children,
href: String,
#[prop(optional)] classes: String,
Expand All @@ -104,7 +101,7 @@ pub fn SecondaryLinkButton(
}

#[component]
pub fn SecondaryButton(
pub fn SecondaryHighlightedButton(
children: Children,
disabled: Signal<bool>,
alt_style: Signal<bool>,
Expand Down
6 changes: 3 additions & 3 deletions ssr/src/page/icpump/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use futures::StreamExt;
use leptos::*;
use leptos_icons::Icon;

use crate::component::buttons::LinkButton;
use crate::component::buttons::HighlightedLinkButton;
use crate::component::icons::airdrop_icon::AirdropIcon;
use crate::component::icons::arrow_left_right_icon::ArrowLeftRightIcon;
use crate::component::icons::chevron_right_icon::ChevronRightIcon;
Expand Down Expand Up @@ -118,12 +118,12 @@ pub fn ICPumpLanding() -> impl IntoView {
/>
</div>
</div>
<LinkButton
<HighlightedLinkButton
classes="max-w-96 lg:max-w-[32.5%]".to_string()
href="/token/create".to_string()
>
"Create a new coin"
</LinkButton>
</HighlightedLinkButton>
</div>
<div class="flex flex-col gap-8 pb-24">
<ICPumpListing />
Expand Down
9 changes: 5 additions & 4 deletions ssr/src/utils/token/icpump.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use candid::Principal;
use serde::{Deserialize, Serialize};
use std::env;

Expand Down Expand Up @@ -132,11 +133,11 @@ pub async fn get_paginated_token_list(page: u32) -> Result<Vec<TokenListItem>, S
use crate::consts::ICPUMP_LISTING_PAGE_SIZE;
let test_user_id = TokenListItem {
user_id: Principal::anonymous().to_text(),
name: "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".to_string(),
token_name: "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".to_string(),
token_symbol: "AAAAA".to_string(),
name: "Test Token".to_string(),
token_name: "Test Token".to_string(),
token_symbol: "TST".to_string(),
logo: "https://picsum.photos/200".to_string(),
description: "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".to_string(),
description: "This is a test token".to_string(),
created_at: "69".to_string(),
formatted_created_at: "69 mins".to_string(),
link: "link".to_string(),
Expand Down

0 comments on commit 3079ce6

Please sign in to comment.