Skip to content

Commit 18c68d8

Browse files
committed
updated stats card UI
1 parent 5176a6d commit 18c68d8

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

frontend/src/scenes/dashboard/HomePageComponents/StatisticCards/StatisticCards.jsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import ArrowDownwardIcon from "@mui/icons-material/ArrowDownward";
2-
import ArrowUpwardIcon from "@mui/icons-material/ArrowUpward";
1+
import ArrowDownwardRoundedIcon from '@mui/icons-material/ArrowDownwardRounded';
2+
import ArrowUpwardRoundedIcon from '@mui/icons-material/ArrowUpwardRounded';
33
import PropTypes from "prop-types";
44
import React from "react";
55
import styles from "./StatisticCards.module.scss";
@@ -12,7 +12,7 @@ const StatisticCard = ({ metricName, metricValue = 0, changeRate = 0 }) => {
1212

1313
const getRateColor = () => {
1414
if (changeRate === 0) return "inherit";
15-
return changeRate >= 0 ? "green" : "red";
15+
return changeRate >= 0 ? "var(--green-400)" : "var(--red-500)";
1616
};
1717

1818
return (
@@ -22,7 +22,7 @@ const StatisticCard = ({ metricName, metricValue = 0, changeRate = 0 }) => {
2222
<div className={styles.changeRate}>
2323
<span style={{ color: getRateColor() }} className={styles.change}>
2424
{changeRate !== 0 &&
25-
(changeRate >= 0 ? <ArrowUpwardIcon /> : <ArrowDownwardIcon />)}
25+
(changeRate >= 0 ? <ArrowUpwardRoundedIcon /> : <ArrowDownwardRoundedIcon />)}
2626
{getChangeRate()}
2727
</span>
2828
&nbsp;vs last month

frontend/src/scenes/dashboard/HomePageComponents/StatisticCards/StatisticCards.module.scss

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
.statisticCard {
44
border: 1px solid var(--light-gray);
5-
border-radius: 12px;
5+
border-radius: 10px;
66
padding: 24px;
77
gap:10px;
88
display: flex;
@@ -13,12 +13,14 @@
1313

1414
.metricName {
1515
font-size: var(--font-header);
16-
font-weight: 600;
16+
color: var(--gray-350);
17+
font-weight: 400;
1718
line-height: 24px;
1819
margin-bottom: 13px;
1920
}
2021

2122
.metricValue {
23+
color: var(--gray-500);
2224
font-size: 36px;
2325
font-weight: 600;
2426
line-height: 44px;

0 commit comments

Comments
 (0)