diff --git a/src/card.js b/src/card.js
index 3dc0a62..ec21cbc 100644
--- a/src/card.js
+++ b/src/card.js
@@ -1,29 +1,80 @@
import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import Card from '@material-ui/core/Card';
+import Divider from '@material-ui/core/Divider';
import CardActionArea from '@material-ui/core/CardActionArea';
// import CardActions from '@material-ui/core/CardActions';
import CardContent from '@material-ui/core/CardContent';
// import Button from '@material-ui/core/Button';
import Typography from '@material-ui/core/Typography';
-// import { MdShoppingCart } from 'react-icons/md';
-// import { GiMilkCarton } from 'react-icons/gi'
-// import { FaMobileAlt } from 'react-icons/fa'
+import { MdShoppingCart } from 'react-icons/md';
+import { GiMilkCarton } from 'react-icons/gi'
+import { FaMobileAlt } from 'react-icons/fa'
+import Container from '@material-ui/core/Container';
+import Tooltip from '@material-ui/core/Tooltip';
+import EventIcon from '@material-ui/icons/Event';
+import ScheduleIcon from '@material-ui/icons/Schedule';
+import CreateIcon from '@material-ui/icons/Create';
+import DeleteIcon from '@material-ui/icons/Delete';
const useStyles = makeStyles({
root: {
- maxWidth: 345,
+ width: "100%",
+ height: 225,
+ padding: "20px 0"
},
media: {
height: 140,
},
});
+const getIcon = (type) => {
+ if(type===" Clothing") {
+ return ;
+ } else if(type===" Eateries") {
+ return ;
+ } else {
+ return ;
+ }
+}
+
export default function MediaCard(props) {
const classes = useStyles();
return (
-
-
+
+
+
+
+ {getIcon(props.type)}
+
+
+
+ {props.name}
+
+
+ ₹ {props.amount}
+
+ {/*
*/}
+
+ {props.date}
+
+
+ {props.time}
+
+ {/*
*/}
+
+
+
+ {/*
+
+
+
+
+
+
+
*/}
+
+ {/*
Expense Name: {props.name}
@@ -41,7 +92,7 @@ export default function MediaCard(props) {
Time: {props.time}
-
+ */}
);
}
diff --git a/src/dialog.js b/src/dialog.js
index 5c62bb4..e5c06c0 100644
--- a/src/dialog.js
+++ b/src/dialog.js
@@ -18,6 +18,7 @@ import Select from '@material-ui/core/Select';
import { makeStyles } from '@material-ui/core/styles';
import Card from './card'
import NavBar from './appbar';
+import { Grid } from '@material-ui/core';
const useStyles = makeStyles((theme) => ({
formControl: {
@@ -82,6 +83,7 @@ export default function FormDialog() {
element.type=props.type;
element.date = d.getDate() + " " + n + "," + " " + d.getFullYear();
element.time = d.toLocaleTimeString();
+ element.key = parseInt(count)
total=parseInt(total)+parseInt(props.amount);
expenses.push((element));
localStorage.setItem("expenses",JSON.stringify(expenses));
@@ -103,8 +105,9 @@ export default function FormDialog() {
var temp1=[];
for(let i=0;i);
+ temp1.push();
}
+ console.log(temp1)
};
const classes = useStyles();
@@ -116,7 +119,18 @@ export default function FormDialog() {
return (
-
{temp1}
+ {/*
{temp1}
*/}
+
+ {
+ temp1.map(card => {
+ return (
+
+ {card}
+
+ )
+ })
+ }
+
diff --git a/src/index.css b/src/index.css
index 05b1439..bcd0fd2 100644
--- a/src/index.css
+++ b/src/index.css
@@ -40,4 +40,28 @@ code {
float: left;
display: inline-block;
margin: 4px;
+}
+
+#cardName {
+ font-size: 35px;
+ font-weight: bold;
+}
+
+#cardAmount {
+ margin-top: 15px;
+ font-size: 20px;
+}
+
+#cardTime {
+ margin-top: 15px;
+ font-size: 20px;
+ display: flex;
+ align-items: center;
+}
+
+#cardDate {
+ margin-top: 15px;
+ font-size: 20px;
+ display: flex;
+ align-items: center;
}
\ No newline at end of file