-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
99 additions
and
43 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,9 @@ | ||
import type { PropsWithChildren } from 'react'; | ||
|
||
export interface CardProps { | ||
className?: string; | ||
} | ||
|
||
export const Card = ({ className = '', children }: PropsWithChildren<CardProps>) => ( | ||
<div className={`bg-white rounded drop-shadow-lg ${className}`}>{children}</div> | ||
); |
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,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 ( | ||
<Card className="mb-6 p-6 flex flex-row items-center"> | ||
<img src={icon} alt="" className="w-12" /> | ||
|
||
<div className="ml-6 w-64"> | ||
<h2 className="font-bold text-2xl">{name}</h2> | ||
<span>{symbol}</span> | ||
</div> | ||
|
||
<div className="w-64"> | ||
<p className="text-grey">Total Supplied</p> | ||
<p className="text-xl font-bold leading-6">5.82M</p> | ||
<p>$5.82M</p> | ||
</div> | ||
|
||
<div className="w-64"> | ||
<p className="text-grey">Supply APY</p> | ||
<p className="text-xl font-bold leading-6">12.34%</p> | ||
</div> | ||
|
||
<Button onClick={handleDepositClick}>Deposit</Button> | ||
</Card> | ||
); | ||
}; |
File renamed without changes
File renamed without changes
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,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, | ||
}, | ||
]; | ||
--- | ||
|
||
<Layout title="Laina – Lending" pathname="lend"> | ||
<ConnectFreighter /> | ||
<h1 class="text-5xl font-bold mb-8">Lend Assets</h1> | ||
|
||
<Loan_pool /> | ||
<h1 class="text-3xl font-bold mb-8">Lend Assets</h1> | ||
{currencies.map(({ name, symbol, icon }) => <LendableAssetCard name={name} symbol={symbol} icon={icon} />)} | ||
</Layout> |
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