From 8d5351d82ba6cc85175a0ca2425107d7ea722581 Mon Sep 17 00:00:00 2001 From: Mohammed Al-yaseen Date: Tue, 16 Dec 2025 00:57:49 +0300 Subject: [PATCH] fix cart items height --- .../CartActionsButtons.module.css | 1 + .../CartActionsButtons/CartActionsButtons.tsx | 2 +- src/components/Icons/DeleteIcon.tsx | 13 ++--- .../components/CartMobileTabletLayout.tsx | 48 ++++++++++--------- 4 files changed, 33 insertions(+), 31 deletions(-) diff --git a/src/components/CartActionsButtons/CartActionsButtons.module.css b/src/components/CartActionsButtons/CartActionsButtons.module.css index a8ba14b..f42ba7e 100644 --- a/src/components/CartActionsButtons/CartActionsButtons.module.css +++ b/src/components/CartActionsButtons/CartActionsButtons.module.css @@ -40,6 +40,7 @@ box-shadow: none; font-size: 16px; font-weight: 600; + padding: 0; } .removeButton { diff --git a/src/components/CartActionsButtons/CartActionsButtons.tsx b/src/components/CartActionsButtons/CartActionsButtons.tsx index 44c6fd9..e86fbc1 100644 --- a/src/components/CartActionsButtons/CartActionsButtons.tsx +++ b/src/components/CartActionsButtons/CartActionsButtons.tsx @@ -109,7 +109,7 @@ export default function CartActionsButtons({ item }: { item: CartItem }) { min={1} max={100} value={item.quantity || 1} - onChange={(value) => + onChange={(value: number) => dispatch( updateQuantity({ id: item.id, diff --git a/src/components/Icons/DeleteIcon.tsx b/src/components/Icons/DeleteIcon.tsx index f7d02ab..9fcc4d6 100644 --- a/src/components/Icons/DeleteIcon.tsx +++ b/src/components/Icons/DeleteIcon.tsx @@ -6,20 +6,17 @@ interface DeleteIconType { const DeleteIcon = ({ className, onClick }: DeleteIconType) => { return ( ); diff --git a/src/pages/cart/components/CartMobileTabletLayout.tsx b/src/pages/cart/components/CartMobileTabletLayout.tsx index c3c8f93..32237ed 100644 --- a/src/pages/cart/components/CartMobileTabletLayout.tsx +++ b/src/pages/cart/components/CartMobileTabletLayout.tsx @@ -124,7 +124,7 @@ export default function CartMobileTabletLayout({ )} {items.map((item, index) => ( -
+
- -
+ +
{isRTL - ? (item.variant as Variant)?.optionsAR?.[0]?.value - : (item.variant as Variant)?.options?.[0]?.value} + ? (item.variant as Variant)?.optionsAR?.[0] + ?.value + : (item.variant as Variant)?.options?.[0] + ?.value}
@@ -176,9 +180,14 @@ export default function CartMobileTabletLayout({ wordWrap: "break-word", overflowWrap: "break-word", lineHeight: "1.4", - maxHeight: isMobile ? "2.8em" : isTablet ? "4.8em" : "6.8em", + maxHeight: isMobile + ? "2.8em" + : isTablet + ? "4.8em" + : "6.8em", fontWeight: 500, letterSpacing: "0.01em", + width: "65%", }} > {item.description} @@ -186,20 +195,15 @@ export default function CartMobileTabletLayout({
- - - +