Skip to content

Commit

Permalink
Merge branch 'main' into fix/delete-unused-reformate
Browse files Browse the repository at this point in the history
  • Loading branch information
Teri-anric committed Dec 17, 2024
2 parents dbbabff + 56f9612 commit ccc46b9
Show file tree
Hide file tree
Showing 21 changed files with 1,719 additions and 6,379 deletions.
Binary file added frontend/public/dashboardmobile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions frontend/src/components/Card/Card.jsx
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;
107 changes: 107 additions & 0 deletions frontend/src/components/Card/card.css
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;
}
}
1 change: 1 addition & 0 deletions frontend/src/components/Footer/footer.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
align-items: center;
justify-content: space-between;
position: relative;
z-index: 15;
}

.footer-text p {
Expand Down
49 changes: 38 additions & 11 deletions frontend/src/components/MetricCard/metricCard.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,67 @@
width: 309px;
background: var(--header-button-bg);
border: var(--midnight-purple-border);
border-radius: 900px;
border-radius: 8px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 4px;
padding: 24px;
}

.card-header {
.card-header .label{
font-size: 14px;
line-height: 19px;
font-weight: 600;
}

.card-value .metric-card-value{
font-size: 24px;
line-height: 32px;
font-weight: 600;
}



@media (max-width: 768px) {
.metric-card {
width: 100%; /* Full width on mobile */
border-radius: 16px; /* Adjust border radius for mobile */
padding: 16px 24px;
border-radius: 10px; /* Adjust border radius for mobile */
/* padding: 16px 24px; */
}
}

@media (max-width: 640px) {
@media (max-width: 678px) {
.metric-card {
width: 100%; /* Ensure full width on smaller screens */
/* padding: 24px 2px; */
}

.card-header .label {
font-size: 12px;
line-height: 16px;
.card-value .metric-card-value {
font-size: 21px;
/* line-height: 21px; */
}
}

.card-value .metric-card-value {
font-size: 20px;
line-height: 27px;
@media (max-width: 480px) {
.metric-card {
padding: 0 2px;
}

.card-header .label {
font-size: 12px;
line-height: 16px;
}

.card-value .metric-card-value {
font-size: 16px;
line-height: 21px;
}
}

@media (max-width: 426px) {



}
26 changes: 26 additions & 0 deletions frontend/src/components/borrow/Borrow.jsx
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
115 changes: 115 additions & 0 deletions frontend/src/components/borrow/borrow.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
.tab-content {
font-size: 16px;
font-weight: 400;
text-align: left;
width: fit-content;
height: fit-content;
padding: 4px;
padding-top: 0;
}

.currency-info {
margin-top: 1rem;
display: flex;
align-items: center;
}

.currency-name {
font-size: 20px;
color: var(--second-primary);
}

.balance-info {
font-size: 16px;
gap: 8px;
display: flex;
flex-direction: column;
width: 594px;
height: 190px;
margin-top: 12px;
}
.balance-label {
color: var(--gray);
font-size: 16px;
font-weight: 400;
}

.balance-value {
color: var(--second-primary);
margin-left: 2px;
}
.icon {
width: 32px;
height: 32px;
margin-right: 8px;
background: var(--border-color);
border-radius: 900px;
display: flex;
align-items: center;
justify-content: center;
padding: 7px;
}

@media (max-width: 768px) {
.icon {
width: 24px;
height: 24px;
margin-right: 4px;
padding: 3px;
}

.tab-content {
width: 100%;
height: auto;
padding: 16px;
}

.balance-info {
width: 100%;
height: auto;
}

.currency-name {
font-size: 18px;
}

.balance-label,
.balance-value,
.current-sum-red {
font-size: 14px;
}

.top-card-value {
font-size: 18px;
}

.tab-icon {
width: 20px;
height: 20px;
margin-right: 4px;
}
}

@media (max-width: 480px) {
.tab-content {
width: fit-content;
font-size: 14px;
}

.currency-symbol {
font-size: 16px;
}

.currency-name {
font-size: 16px;
}

.icon {
width: 20px;
height: 20px;
}

.balance-info {
width: fit-content;
}
}
Loading

0 comments on commit ccc46b9

Please sign in to comment.