Skip to content

Commit bc67872

Browse files
committed
chore: change style of PriceUnit
1 parent f498293 commit bc67872

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/app/[locale]/(main)/(container)/cart/page.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ const Page = () => {
180180
value={cart.discountTotal}
181181
TypographyProps={{
182182
fontWeight: 600,
183+
color: 'error',
183184
}}
184185
/>
185186
),

src/components/common/PriceLabel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const PriceLabel: FC<PriceLabelProps> = ({
2828
return (
2929
<Box display="flex" alignItems="center">
3030
<Typography {...TypographyProps}>{_value?.toLocaleString()}</Typography>
31-
<PriceUnit title={t('units.price')} />
31+
<PriceUnit title={t('units.price')} TypographyProps={TypographyProps} />
3232
</Box>
3333
);
3434
};

src/components/common/PriceUnit.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
import { Typography } from '@mui/material';
1+
import { Typography, TypographyProps } from '@mui/material';
22
import { FC } from 'react';
33

44
export interface PriceUnitProps {
55
title: string;
6+
TypographyProps?: Partial<TypographyProps>;
67
}
7-
const PriceUnit: FC<PriceUnitProps> = ({ title }) => {
8+
const PriceUnit: FC<PriceUnitProps> = ({ title, TypographyProps }) => {
89
return (
910
<Typography
11+
{...TypographyProps}
1012
sx={{
13+
...TypographyProps?.sx,
1114
fontSize: 10,
1215
fontWeight: 400,
1316
userSelect: 'none',

0 commit comments

Comments
 (0)