🎨 styles: product in cart

:%s
This commit is contained in:
lytrankieio123 2021-09-06 17:26:23 +07:00
parent fc39eb1758
commit 7a5a28082b
4 changed files with 27 additions and 16 deletions

View File

@ -5,7 +5,6 @@
grid-template-columns: 2fr 1fr;
padding-bottom: 1.6rem;
padding-top: 1.6rem;
border-bottom: 1px solid var(--border-line);
.info {
@apply flex;
.imgWrap {
@ -18,6 +17,11 @@
}
.detail {
min-height: 9rem;
.name {
&:hover {
color: var(--primary);
}
}
.price {
margin-top: 0.8rem;
.old {

View File

@ -1,5 +1,9 @@
.productsInCart {
padding: 1.6rem 1.6rem 0 1.6rem;
margin-bottom: -1px;
list-style: none;
li {
&:not(:last-child) {
border-bottom: 1px solid var(--border-line);
}
}
}

View File

@ -8,20 +8,22 @@ interface Props {
const ProductsInCart = ({ data }: Props) => {
return (
<div className={s.productsInCart}>
<ul className={s.productsInCart}>
{
data.map(item => <ProductCartItem
key={item.name}
name={item.name}
weight={item.weight}
price={item.price}
oldPrice={item.oldPrice}
discount={item.discount}
imageSrc={item.imageSrc}
quantity={item.quantity}
/>)
data.map(item => <li key={item.name}>
<ProductCartItem
name={item.name}
slug={item.slug}
weight={item.weight}
price={item.price}
oldPrice={item.oldPrice}
discount={item.discount}
imageSrc={item.imageSrc}
quantity={item.quantity}
/>
</li>)
}
</div>
</ul>
)
}

View File

@ -8,6 +8,7 @@ export const SOCIAL_LINKS = {
export const ROUTE = {
HOME: '/',
PRODUCTS: '/products',
PRODUCT_DETAIL: '/product',
ABOUT: '/about',
ACCOUNT: '/account',
RECIPES: '/recipes',