diff --git a/src/components/card/cart/index.jsx b/src/components/card/cart/index.jsx new file mode 100644 index 0000000..a8abbd1 --- /dev/null +++ b/src/components/card/cart/index.jsx @@ -0,0 +1,25 @@ +import styles from './index.module.scss' +import JacketImage from '../../../assets/images/products/jacket.svg' + +const CartItem = () => { + return ( +
+
+ +
+
+

Quilted Satin Jacket

+
+ $145 +
+ + 1 + +
+
+
+
+ ) +} + +export default CartItem diff --git a/src/components/card/cart/index.module.scss b/src/components/card/cart/index.module.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/components/card/index.jsx b/src/components/card/product/index.jsx similarity index 90% rename from src/components/card/index.jsx rename to src/components/card/product/index.jsx index f691e56..414c82b 100644 --- a/src/components/card/index.jsx +++ b/src/components/card/product/index.jsx @@ -1,6 +1,6 @@ import styles from './index.module.scss' -import WishIcon from '../../assets/icons/wish.svg' +import WishIcon from '../../../assets/icons/wish.svg' const ProductCard = ({ name, price, imageUrl }) => { return ( diff --git a/src/components/card/index.module.scss b/src/components/card/product/index.module.scss similarity index 92% rename from src/components/card/index.module.scss rename to src/components/card/product/index.module.scss index b78a18b..d4013a3 100644 --- a/src/components/card/index.module.scss +++ b/src/components/card/product/index.module.scss @@ -1,4 +1,4 @@ -@use '../../assets/styles/variables' as *; +@use '../../../assets/styles/variables' as *; .product { display: flex; diff --git a/src/components/list/cart/index.jsx b/src/components/list/cart/index.jsx new file mode 100644 index 0000000..2e0b803 --- /dev/null +++ b/src/components/list/cart/index.jsx @@ -0,0 +1,14 @@ +import CartItem from '../../card/cart' +import styles from './index.module.scss' + +const CartList = () => { + return ( + + ) +} + +export default CartList diff --git a/src/components/list/cart/index.module.scss b/src/components/list/cart/index.module.scss new file mode 100644 index 0000000..9093ada --- /dev/null +++ b/src/components/list/cart/index.module.scss @@ -0,0 +1,34 @@ +.table { + width: 100%; + border: none; + margin-bottom: 20px; +} +.table thead th { + font-weight: bold; + text-align: left; + border: none; + padding: 10px 15px; + background: #d8d8d8; + font-size: 14px; + border-left: 1px solid #ddd; + border-right: 1px solid #ddd; +} +.table tbody td { + text-align: left; + border-left: 1px solid #ddd; + border-right: 1px solid #ddd; + padding: 10px 15px; + font-size: 14px; + vertical-align: top; +} +.table thead tr th:first-child, +.table tbody tr td:first-child { + border-left: none; +} +.table thead tr th:last-child, +.table tbody tr td:last-child { + border-right: none; +} +.table tbody tr:nth-child(even) { + background: #f3f3f3; +} diff --git a/src/components/list/index.jsx b/src/components/list/product/index.jsx similarity index 96% rename from src/components/list/index.jsx rename to src/components/list/product/index.jsx index 2e6c0cf..db22f0c 100644 --- a/src/components/list/index.jsx +++ b/src/components/list/product/index.jsx @@ -1,7 +1,7 @@ import React from 'react' import styles from './index.module.scss' -import ProductCard from '../card' +import ProductCard from '../../card/product' const ProductList = () => { const [products, setProducts] = React.useState([]) diff --git a/src/components/list/index.module.scss b/src/components/list/product/index.module.scss similarity index 100% rename from src/components/list/index.module.scss rename to src/components/list/product/index.module.scss diff --git a/src/pages/cart/index.jsx b/src/pages/cart/index.jsx index 8b3acb5..cdc99c0 100644 --- a/src/pages/cart/index.jsx +++ b/src/pages/cart/index.jsx @@ -1,5 +1,15 @@ +import styles from './index.module.scss' + +import Header from '../../components/header' +import CartList from '../../components/list/cart' + const Cart = () => { - return <> + return ( +
+
+ +
+ ) } export default Cart diff --git a/src/pages/cart/index.module.scss b/src/pages/cart/index.module.scss index e69de29..3d536a3 100644 --- a/src/pages/cart/index.module.scss +++ b/src/pages/cart/index.module.scss @@ -0,0 +1,4 @@ +.container { + max-width: 1170px; + margin: 0 auto; +} diff --git a/src/pages/catalog/index.jsx b/src/pages/catalog/index.jsx index fcd91b4..d12a636 100644 --- a/src/pages/catalog/index.jsx +++ b/src/pages/catalog/index.jsx @@ -1,7 +1,7 @@ import styles from './index.module.scss' import Header from '../../components/header/index' -import ProductList from '../../components/list/index' +import ProductList from '../../components/list/product/index' const Catalog = () => { return (