fix line-through styles
This commit is contained in:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user