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

View File

@ -1,5 +1,9 @@
.productsInCart { .productsInCart {
padding: 1.6rem 1.6rem 0 1.6rem; 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) => { const ProductsInCart = ({ data }: Props) => {
return ( return (
<div className={s.productsInCart}> <ul className={s.productsInCart}>
{ {
data.map(item => <ProductCartItem data.map(item => <li key={item.name}>
key={item.name} <ProductCartItem
name={item.name} name={item.name}
weight={item.weight} slug={item.slug}
price={item.price} weight={item.weight}
oldPrice={item.oldPrice} price={item.price}
discount={item.discount} oldPrice={item.oldPrice}
imageSrc={item.imageSrc} discount={item.discount}
quantity={item.quantity} imageSrc={item.imageSrc}
/>) quantity={item.quantity}
/>
</li>)
} }
</div> </ul>
) )
} }

View File

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