Skip to content

Commit 7964bf4

Browse files
committed
added Total Boxes for overview page
1 parent 06be716 commit 7964bf4

File tree

4 files changed

+109
-3
lines changed

4 files changed

+109
-3
lines changed

src/components/TotalBox.jsx

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import styles from './TotalBox.module.css'
2+
3+
export default function TotalBox({ title, secTitle, totalAmount, incomeStatement, sign }) {
4+
return (
5+
<div className={styles["total-income-statement-box"]}>
6+
<div className={styles["total-income-statement-box__headers"]}>
7+
<div>
8+
<h1>{ title }</h1>
9+
<h5>{ secTitle }</h5>
10+
</div>
11+
{ sign }
12+
</div>
13+
<div className={styles["total-income-statement-box__amounts"]}>
14+
<div>
15+
<h2>{ totalAmount }</h2>
16+
<h6>{ incomeStatement }</h6>
17+
</div>
18+
{/* // Todo icome statement photo */}
19+
</div>
20+
</div>
21+
)
22+
}

src/components/TotalBox.module.css

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
.total-income-statement-box {
2+
background: #FFFFFF;
3+
padding: 30px;
4+
border-radius: 20px;
5+
width: 100%;
6+
box-shadow: 0 5px 20px rgb(141, 141, 141, 0.2);
7+
}
8+
.total-income-statement-box__headers, .total-income-statement-box__amounts {
9+
display: flex;
10+
align-items: center;
11+
justify-content: space-between;
12+
}
13+
.total-income-statement-box__amounts {
14+
margin-top: 40px;
15+
}
16+
.total-income-statement-box__headers h1 {
17+
font-size: 1.5rem;
18+
font-weight: 500;
19+
}
20+
.total-income-statement-box__headers h1 ~ h5 {
21+
color: #aaaaaa;
22+
margin-top: 15px;
23+
}
24+
.total-income-statement-box__amounts h2 {
25+
font-size: 1.9rem;
26+
font-weight: 600;
27+
}
28+
.total-income-statement-box__amounts h6 {
29+
margin-top: 15px;
30+
color: #4f98f8;
31+
font-weight: 500;
32+
}
33+
:global(.total-income-statement-box__sign-blue), :global(.total-income-statement-box__sign-green), :global(.total-income-statement-box__sign-red) {
34+
padding: 20px;
35+
border-radius: 15px;
36+
}
37+
:global(.total-income-statement-box__sign-blue) {
38+
background-color: #e6efff;
39+
color: #0059ff;
40+
}
41+
:global(.total-income-statement-box__sign-red) {
42+
background-color: #ffe2e2;
43+
color: #ff7a7a;
44+
}
45+
:global(.total-income-statement-box__sign-green) {
46+
background-color: #e5fde5;
47+
color: #3cc95a;
48+
}

src/pages/Overview.jsx

+33-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,37 @@
1+
import { WalletMoney, MoneySend, UsdCoin } from 'iconsax-react'
2+
3+
import TotalBox from '../components/TotalBox'
4+
5+
import styles from './Overview.module.css'
6+
7+
8+
19
export default function Overview() {
210
return (
3-
<h1>
4-
Overview
5-
</h1>
11+
<>
12+
<div className={styles["total-boxes"]}>
13+
<TotalBox //Todo u can use json-server for making this app like a real world react application
14+
title="Total Balance"
15+
secTitle="2 July-24 September 2023" //Todo provide a real date
16+
totalAmount="$982.000,90"
17+
incomeStatement="+ 16% Last Year"
18+
sign={<WalletMoney className="total-income-statement-box__sign-blue" variant="Bold"/>}
19+
/>
20+
<TotalBox //Todo u can use json-server for making this app like a real world react application
21+
title="Total Balance"
22+
secTitle="2 July-24 September 2023" //Todo provide a real date
23+
totalAmount="$982.000,90"
24+
incomeStatement="+ 16% Last Year"
25+
sign={<UsdCoin className="total-income-statement-box__sign-green" variant="Bold"/>}
26+
/>
27+
<TotalBox //Todo u can use json-server for making this app like a real world react application
28+
title="Total Balance"
29+
secTitle="2 July-24 September 2023" //Todo provide a real date
30+
totalAmount="$982.000,90"
31+
incomeStatement="+ 16% Last Year"
32+
sign={<MoneySend className="total-income-statement-box__sign-red" variant="Bold"/>}
33+
/>
34+
</div>
35+
</>
636
)
737
}

src/pages/Overview.module.css

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.total-boxes {
2+
display: flex;
3+
justify-content: space-between;
4+
margin-top: 100px;
5+
column-gap: 80px;
6+
}

0 commit comments

Comments
 (0)