fix line-through styles

This commit is contained in:
2025-11-06 23:34:20 +03:00
parent 9454007905
commit 2a75d46f84
4 changed files with 43 additions and 47 deletions

View File

@@ -25,6 +25,10 @@ const ArabicPrice: React.FC<ArabicPriceProps> = ({
// Format the price to ensure it has 2 decimal places
const formattedPrice = typeof price === "number" ? price.toFixed(2) : price;
const { textDecoration, ...restStyle } = style;
const decorationStyle = textDecoration
? ({ textDecoration } as React.CSSProperties)
: undefined;
return (
<ProText
@@ -36,7 +40,7 @@ const ArabicPrice: React.FC<ArabicPriceProps> = ({
alignItems: "baseline",
gap: "0.2em",
lineHeight: 1,
...style,
...restStyle,
}}
>
{isRTL && !hideCurrency ? (
@@ -45,6 +49,7 @@ const ArabicPrice: React.FC<ArabicPriceProps> = ({
style={{
verticalAlign: "baseline",
lineHeight: 1,
...(decorationStyle ?? {}),
}}
>
{formattedPrice}
@@ -56,6 +61,7 @@ const ArabicPrice: React.FC<ArabicPriceProps> = ({
lineHeight: 1,
position: "relative",
top: -3,
...(decorationStyle ?? {}),
}}
>
{t("common.omanCurrency")}
@@ -68,6 +74,7 @@ const ArabicPrice: React.FC<ArabicPriceProps> = ({
verticalAlign: "baseline",
lineHeight: 1,
display: "inline-block",
...(decorationStyle ?? {}),
}}
>
{formattedPrice}
@@ -78,13 +85,14 @@ const ArabicPrice: React.FC<ArabicPriceProps> = ({
verticalAlign: "baseline",
lineHeight: 1,
display: "inline-block",
...(decorationStyle ?? {}),
}}
>
{t("common.omanCurrency")}
</span>
</>
) : (
<>{formattedPrice}</>
<span style={decorationStyle}>{formattedPrice}</span>
)}
</ProText>
);