-
Notifications
You must be signed in to change notification settings - Fork 104
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' of https://github.com/Akshola00/spotnet
- Loading branch information
Showing
34 changed files
with
1,245 additions
and
6,139 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,27 @@ | ||
import './card.css'; | ||
|
||
function Card({ label, icon, value = '', cardData = [] }) { | ||
return ( | ||
<div className="card"> | ||
<div className="card-header"> | ||
{icon} | ||
<span className="label">{label}</span> | ||
</div> | ||
<div className="card-value"> | ||
{cardData.length > 0 ? ( | ||
<> | ||
<span className="currency-symbol">$</span> | ||
<span className="top-card-value"> | ||
{' '} | ||
{cardData[1]?.balance ? Number(cardData[1].balance).toFixed(8) : '0.00'} | ||
</span> | ||
</> | ||
) : ( | ||
<span className="top-card-value">{value}</span> | ||
)} | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default Card; |
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,107 @@ | ||
.card { | ||
width: 309px; | ||
height: 101px; | ||
background: var(--dark-background); | ||
border: 1px solid var(--light-purple); | ||
border-radius: 900px; | ||
padding-top: 4px; | ||
padding-right: 24px; | ||
padding-left: 24px; | ||
text-align: center; | ||
} | ||
|
||
.top-card-value { | ||
font-size: 24px; | ||
} | ||
.card-header { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
border: none; | ||
color: var(--second-primary); | ||
} | ||
.currency-symbol { | ||
margin-right: 4px; | ||
font-size: inherit; | ||
color: inherit; | ||
} | ||
|
||
.label { | ||
font-size: 14px; | ||
font-weight: 600; | ||
} | ||
|
||
.card-value { | ||
font-size: 24px; | ||
font-weight: 600; | ||
height: fit-content; | ||
color: var(--second-primary); | ||
} | ||
|
||
@media (max-width: 768px) { | ||
.card { | ||
height: 90px; | ||
padding: 8px 2px 14px 2px; | ||
border-radius: 14px; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
.card-header { | ||
padding: 0; | ||
} | ||
|
||
.card-header .label { | ||
font-size: 14px; | ||
font-weight: 400; | ||
} | ||
|
||
.currency-symbol { | ||
font-size: 18px; | ||
} | ||
|
||
.top-card-value { | ||
font-size: 18px; | ||
} | ||
} | ||
|
||
@media (max-width: 550px) { | ||
.card { | ||
background: var(--deep-purple); | ||
} | ||
} | ||
|
||
@media (max-width: 480px) { | ||
.top-card-value { | ||
font-size: 16px; | ||
} | ||
.currency-symbol { | ||
font-size: 16px; | ||
} | ||
.card { | ||
width: 167px; | ||
padding: 16px 0px; | ||
} | ||
} | ||
|
||
@media (max-width: 400px) { | ||
.card { | ||
width: 167px; | ||
padding: 16px 0px; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-between; | ||
} | ||
.top-card-value { | ||
font-size: 14px; | ||
} | ||
} | ||
|
||
@media (max-width: 320px) { | ||
.card { | ||
width: 167px; | ||
padding: 10px 0px; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import React from "react" | ||
import './borrow.css' | ||
import { ReactComponent as BorrowIcon } from 'assets/icons/borrow_dynamic.svg'; | ||
|
||
function Borrow({data}){ | ||
return ( | ||
<div className="tab-content"> | ||
<div className="balance-info"> | ||
<div className="currency-info"> | ||
{React.createElement(data[1]?.currencyIcon || BorrowIcon, { | ||
className: 'icon', | ||
})} | ||
<span className="currency-name">{data[1]?.currencyName || 'N/A'}</span> | ||
</div> | ||
<span> | ||
<span className="balance-label">Balance: </span> | ||
<span className="balance-value"> | ||
{data[1]?.balance ? Number(data[1].balance).toFixed(8) : '0.00'} | ||
</span> | ||
</span> | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default Borrow |
Oops, something went wrong.