diff --git a/src/components/Button.tsx b/src/components/Button.tsx index 851fd876..5b619639 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -1,5 +1,20 @@ import type { PropsWithChildren } from 'react'; +export interface ButtonProps { + onClick: () => void; + className?: string; +} + +export const Button = ({ onClick, className = '', children }: PropsWithChildren) => ( + +); + export const SelectButtonWrapper = ({ children }: PropsWithChildren) => (
{children}
); @@ -10,7 +25,10 @@ export interface SelectLinkButtonProps { } export const SelectLinkButton = ({ href, selected, children }: PropsWithChildren) => ( - + {children} ); diff --git a/src/components/Card.tsx b/src/components/Card.tsx new file mode 100644 index 00000000..a760a5cc --- /dev/null +++ b/src/components/Card.tsx @@ -0,0 +1,9 @@ +import type { PropsWithChildren } from 'react'; + +export interface CardProps { + className?: string; +} + +export const Card = ({ className = '', children }: PropsWithChildren) => ( +
{children}
+); diff --git a/src/components/LendableAssetCard.tsx b/src/components/LendableAssetCard.tsx new file mode 100644 index 00000000..03c7041a --- /dev/null +++ b/src/components/LendableAssetCard.tsx @@ -0,0 +1,38 @@ +import { Button } from './Button'; +import { Card } from './Card'; + +export interface LendableAssetCardProps { + name: string; + symbol: string; + icon: string; +} + +export const LendableAssetCard = ({ name, symbol, icon }: LendableAssetCardProps) => { + const handleDepositClick = () => { + console.log('deposit clicked'); + }; + + return ( + + + +
+

{name}

+ {symbol} +
+ +
+

Total Supplied

+

5.82M

+

$5.82M

+
+ +
+

Supply APY

+

12.34%

+
+ + +
+ ); +}; diff --git a/public/Stellar_Symbol.png b/src/images/Stellar_Symbol.png similarity index 100% rename from public/Stellar_Symbol.png rename to src/images/Stellar_Symbol.png diff --git a/public/usdc.svg b/src/images/usdc.svg similarity index 100% rename from public/usdc.svg rename to src/images/usdc.svg diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index b9d9b077..7de69840 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -41,7 +41,7 @@ const { title, pathname } = Astro.props; width: 800px; max-width: calc(100% - 2rem); color: rgb(0, 0, 0); - font-size: 20px; + font-size: 18px; line-height: 1.6; } code { @@ -55,44 +55,6 @@ const { title, pathname } = Astro.props; Courier New, monospace; } - button { - border: 1px solid rgb(var(--accent)); - background-color: #000000; - background-image: none; - background-size: 400%; - border-radius: 20px; - color: white; - cursor: pointer; - font-size: inherit; - padding: 0.5rem 1rem; - background-position: 100%; - transition: background-position 0.6s cubic-bezier(0.22, 1, 0.36, 1); - } - button:is(:hover, :focus-within) { - color: rgb(185, 185, 185); - background-position: 0; - background-size: 400%; - background-image: var(--accent-gradient); - } - button:is(:disabled) { - color: white; - background: var(--accent-light); - cursor: not-allowed; - } - - button:is(:disabled).loading { - background: linear-gradient(-45deg, #ffffff44, #ffffff22); - background-size: 200%; - animation: loading-gradient 4s linear infinite; - } - @keyframes loading-gradient { - 0% { - background-position: 0% 50%; - } - 100% { - background-position: -200% 50%; - } - } .visually-hidden { clip: rect(0 0 0 0); clip-path: inset(50%); diff --git a/src/pages/lend.astro b/src/pages/lend.astro index 3fc5fd18..9553cb83 100644 --- a/src/pages/lend.astro +++ b/src/pages/lend.astro @@ -1,12 +1,27 @@ --- import ConnectFreighter from '../components/ConnectFreighter.astro'; +import { LendableAssetCard } from '../components/LendableAssetCard.tsx'; import Loan_pool from '../components/lending.astro'; +import StellarIcon from '../images/Stellar_Symbol.png'; +import USDCIcon from '../images/usdc.svg'; import Layout from '../layouts/Layout.astro'; + +const currencies = [ + { + name: 'USD Coin', + symbol: 'USDC', + icon: USDCIcon.src, + }, + { + name: 'Stellar Lumen', + symbol: 'XLM', + icon: StellarIcon.src, + }, +]; --- -

Lend Assets

- - +

Lend Assets

+ {currencies.map(({ name, symbol, icon }) => )}
diff --git a/tailwind.config.mjs b/tailwind.config.mjs index 09012222..afd30337 100644 --- a/tailwind.config.mjs +++ b/tailwind.config.mjs @@ -8,11 +8,25 @@ export default { colors: { white: '#fff', grey: { + dark: '#555', DEFAULT: '#999', light: '#efefef', }, black: '#000', }, + fontSize: { + sm: ['16px', '20px'], + base: ['18px', '24px'], + lg: ['20px', '28px'], + xl: ['26px', '32px'], + '2xl': ['32px', '40px'], + '3xl': ['48px', '56px'], + }, + borderRadius: { + none: '0', + DEFAULT: '16px', + full: '9999px', + }, extend: { spacing: { 128: '32rem',