diff --git a/src/views/Cart/Item/index.js b/src/views/Cart/Item/index.js
index a2ac765..24323e8 100644
--- a/src/views/Cart/Item/index.js
+++ b/src/views/Cart/Item/index.js
@@ -30,57 +30,58 @@ export default function Item(props) {
const { data, handleCounter, handleDelete } = props;
return (
-
-
-
-
- {data.title}
-
- {data.subTitle}
-
- {data.options}بسته الحاقی:
-
-
- |
-
-
- {data.price} تومان
-
-
- {data.slicePrice} قیمت هر واحد
-
- |
-
-
-
-
- {data.number}
-
-
-
- |
-
- handleDelete(data.id)}
- />
- handleDelete(data.id)}
- style={{ fontSize: fontSize.desktop.delete.span }}
- >
- حذف
-
- |
+
+
+
+
+ {data.title}
+
+ {data.subTitle}
+
+ {data.options}بسته الحاقی:
+
+
+ |
+
+
+ {data.price} تومان
+
+
+ {data.slicePrice} قیمت هر واحد
+
+ |
+
+
+
+
+ {data.number}
+
+
+
+ |
+
+ handleDelete(data.id)}
+ />
+ handleDelete(data.id)}
+ style={{ fontSize: fontSize.desktop.delete.span }}
+ >
+ حذف
+
+ |
+
);
}
diff --git a/src/views/Cart/Item/index.scss b/src/views/Cart/Item/index.scss
index f4f5cbd..b161ec3 100644
--- a/src/views/Cart/Item/index.scss
+++ b/src/views/Cart/Item/index.scss
@@ -1,8 +1,10 @@
.cart-item{
- justify-content: space-between;
+ // justify-content: space-between;
border-top: 1px solid #eee;
padding: 15px 0px;
&__info{
+ flex: 3;
+ // flex-shrink: 1;
img{
height: 100px;
border-radius: 10px;
@@ -27,6 +29,8 @@
}
}
&__price{
+ flex: 1.5;
+ flex-shrink: 1;
color: #4D4D4F;
strong{
font-family: numeralBold;
@@ -36,6 +40,9 @@
}
}
&__counter{
+ flex: 1.5;
+ flex-shrink: 1;
+ justify-content: center;
&--box{
padding: 5px 10px;
border: 1px solid rgb(177, 177, 177);
@@ -54,6 +61,7 @@
}
&__delete{
+ flex: 1;
margin-left: 20px;
span{
font-family: numeralLight;
diff --git a/src/views/Cart/Table/index.js b/src/views/Cart/Table/index.js
new file mode 100644
index 0000000..04bbd62
--- /dev/null
+++ b/src/views/Cart/Table/index.js
@@ -0,0 +1,144 @@
+import React from 'react';
+import { makeStyles } from '@material-ui/core/styles';
+import Table from '@material-ui/core/Table';
+import TableBody from '@material-ui/core/TableBody';
+import TableCell from '@material-ui/core/TableCell';
+import TableContainer from '@material-ui/core/TableContainer';
+import TableHead from '@material-ui/core/TableHead';
+import TableRow from '@material-ui/core/TableRow';
+import Paper from '@material-ui/core/Paper';
+import DeleteOutlineOutlinedIcon from "@material-ui/icons/DeleteOutlineOutlined";
+
+import './index.scss';
+const useStyles = makeStyles({
+ table: {
+ },
+});
+
+const maxMobileSize = 550;
+
+const fontSize = {
+ mobile: {
+ info: {
+ strong: window.innerWidth > maxMobileSize ? 15 : window.innerWidth / 28,
+ p: window.innerWidth > maxMobileSize ? 12 : window.innerWidth / 36,
+ span: window.innerWidth > maxMobileSize ? 12 : window.innerWidth / 36,
+ },
+ price: {
+ strong: window.innerWidth > maxMobileSize ? 16 : window.innerWidth / 22,
+ span: window.innerWidth > maxMobileSize ? 13 : window.innerWidth / 40,
+ },
+ counter: {
+ button: window.innerWidth > maxMobileSize ? 20 : window.innerWidth / 25,
+ span: window.innerWidth > maxMobileSize ? 15 : window.innerWidth / 25,
+ },
+ delete: {
+ span: window.innerWidth > maxMobileSize ? 13 : window.innerWidth / 28,
+ },
+ },
+};
+
+
+
+export default function BasicTable(props) {
+ const classes = useStyles();
+ const {list, handleCounter, handleDelete} = props;
+
+ return (
+ <>
+ {
+ window.innerWidth < 1000 ?
+
@@ -127,7 +144,21 @@ export default class Cart extends Component {
>
) : null}
+ {
+ window.innerWidth < 1000 ?
+
: null
+ }
+
>
+
);
}
}
diff --git a/src/views/Cart/index.scss b/src/views/Cart/index.scss
index 1a0ec87..bac31bd 100644
--- a/src/views/Cart/index.scss
+++ b/src/views/Cart/index.scss
@@ -67,3 +67,17 @@
}
}
}
+
+.mobile-cart{
+ width: 100vw;
+ max-width: 650px;
+ margin: 0px auto;
+ padding : 0px 10px 40px;
+ direction: rtl;
+ padding-top: 60px;
+ overflow-x: hidden;
+ h1{
+ font-family: numeralBold;
+ color: #373737;
+ }
+}
\ No newline at end of file