Skip to content

Commit 6d5fcd8

Browse files
authored
Merge pull request #7011 from Namanv0509/addon-1
Pricing add on styling update
2 parents 634c90a + 4c1d1f5 commit 6d5fcd8

3 files changed

Lines changed: 13 additions & 12 deletions

File tree

src/components/Pricing/PricingAddons/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ export const PricingAddons = ({ isYearly = false, setIsYearly, currency, enterpr
442442
<Box sx={boxStyles.sliderMarks}>
443443
<Box>{option.units}</Box>
444444
<Box sx={boxStyles.sliderPriceText}>
445-
{formatSliderPrice(isYearly ? option.yearlyPerUnit : option.monthlyPerUnit, currency)}
445+
{formatSliderPrice(isYearly ? option.yearlyPerUnit * option.units : option.monthlyPerUnit * option.units, currency)}
446446
</Box>
447447
</Box>
448448
),

src/components/Pricing/PricingAddons/styles.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,9 @@ export const boxStyles = {
176176
mt: 0.5
177177
},
178178
sliderPriceText: {
179-
color: "primary.main",
180-
fontWeight: "bold",
179+
color: "text.secondary",
180+
fontWeight: "normal",
181+
fontSize: "1.2rem",
181182
mt: 0.5
182183
},
183184
academySliderMarks: {

src/utils/currencies.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,36 @@ export const Currencies = {
33
name: "USD",
44
symbol: "$",
55
rate: 1,
6-
formatPrice: (price) =>
6+
formatPrice: (price,roundForDisplay=false) =>
77
new Intl.NumberFormat("en-US", {
88
style: "currency",
99
currency: "USD",
10-
minimumFractionDigits: 0,
11-
maximumFractionDigits: 2,
10+
minimumFractionDigits: roundForDisplay ? 0 : 2,
11+
maximumFractionDigits: roundForDisplay ? 0 : 2,
1212
}).format(price),
1313
},
1414
EUR: {
1515
name: "EUR",
1616
symbol: "€",
1717
rate: 0.86,
18-
formatPrice: (price) =>
18+
formatPrice: (price,roundForDisplay=false) =>
1919
new Intl.NumberFormat("en-US", {
2020
style: "currency",
2121
currency: "EUR",
22-
minimumFractionDigits: 0,
23-
maximumFractionDigits: 2,
22+
minimumFractionDigits: roundForDisplay ? 0 : 2,
23+
maximumFractionDigits: roundForDisplay ? 0 : 2,
2424
}).format(price * 0.86),
2525
},
2626
INR: {
2727
name: "INR",
2828
symbol: "₹",
2929
rate: 88.32,
30-
formatPrice: (price) =>
30+
formatPrice: (price,roundForDisplay=false) =>
3131
new Intl.NumberFormat("en-US", {
3232
style: "currency",
3333
currency: "INR",
34-
minimumFractionDigits: 0,
35-
maximumFractionDigits: 2,
34+
minimumFractionDigits: roundForDisplay ? 0 : 2,
35+
maximumFractionDigits: roundForDisplay ? 0 : 2,
3636
}).format(price * 88),
3737
},
3838
};

0 commit comments

Comments
 (0)