fix cart items height

This commit is contained in:
2025-12-16 00:57:49 +03:00
parent 7b47d47e78
commit 8d5351d82b
4 changed files with 33 additions and 31 deletions

View File

@@ -124,7 +124,7 @@ export default function CartMobileTabletLayout({
<Divider style={{ margin: "0px 0px 10px 0px" }} />
)}
{items.map((item, index) => (
<div key={index}>
<div key={index} style={{ position: "relative" }}>
<Space
size="middle"
style={{
@@ -134,12 +134,14 @@ export default function CartMobileTabletLayout({
height: "100%",
}}
>
<Space
direction="vertical"
size="small"
style={{ flex: 1, gap: isMobile ? 32 : isTablet ? 24 : 32 }}
>
<div>
<Space direction="vertical" size="small">
<div
style={{
position: "absolute",
top: 0,
[isRTL ? "right" : "left"]: 0,
}}
>
<ProText
style={{
margin: 0,
@@ -155,8 +157,10 @@ export default function CartMobileTabletLayout({
}}
>
{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}
</span>
</ProText>
<br />
@@ -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({
</div>
<div
style={{
display: "flex",
flexDirection: "row",
justifyContent: "start",
gap: isMobile ? 20 : 24,
position: "absolute",
bottom: index !== items.length - 1 ? 16 : 6,
[isRTL ? "right" : "left"]: 0,
}}
>
<ProText
strong
style={{
fontSize: isMobile ? 14 : isTablet ? 16 : 18,
}}
>
<ArabicPrice price={item.price} />
</ProText>
<ArabicPrice
price={item.price}
style={{ fontStyle: "bold" }}
/>
</div>
</Space>
<div style={{ position: "relative" }}>