Skip to content

Commit 9374f46

Browse files
committed
chore: update Card props to receive id
1 parent 8b98715 commit 9374f46

File tree

2 files changed

+13
-19
lines changed
  • web-components/src/components/cards
  • web-marketplace/src/components/organisms/Order

2 files changed

+13
-19
lines changed

web-components/src/components/cards/Card.tsx

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
import { Card as MuiCard, SxProps } from '@mui/material';
2-
3-
import type { Theme } from '../../theme/muiTheme';
1+
import { Card as MuiCard, CardProps as MuiCardProps } from '@mui/material';
42

3+
type CardProps = MuiCardProps & {
4+
width?: string;
5+
height?: string;
6+
borderColor?: string;
7+
borderRadius?: string;
8+
};
59
export function Card({
610
children,
711
width,
@@ -10,24 +14,12 @@ export function Card({
1014
elevation = 0,
1115
borderColor,
1216
borderRadius,
13-
className,
1417
sx = [],
15-
}: {
16-
children?: any;
17-
width?: string;
18-
height?: string;
19-
onClick?: () => void;
20-
elevation?: number;
21-
borderColor?: string;
22-
borderRadius?: string;
23-
className?: string;
24-
sx?: SxProps<Theme>;
25-
}): JSX.Element {
18+
...props
19+
}: CardProps): JSX.Element {
2620
return (
2721
<MuiCard
2822
onClick={onClick}
29-
className={className}
30-
elevation={elevation}
3123
sx={[
3224
{
3325
border: 1,
@@ -39,6 +31,7 @@ export function Card({
3931
},
4032
...(Array.isArray(sx) ? sx : [sx]),
4133
]}
34+
{...props}
4235
>
4336
{children}
4437
</MuiCard>

web-marketplace/src/components/organisms/Order/Order.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,9 @@ export const Order = ({ orderData, allowedDenoms, className }: OrderProps) => {
7272
const pricePerCredits = +displayTotalPrice / +credits.credits;
7373

7474
return (
75-
<div id={blockchainDetails.blockchainRecord}>
75+
<>
7676
<Card
77+
id={blockchainDetails.blockchainRecord}
7778
className={cn(
7879
'bg-grey-100 border-[1px] border-bc-neutral-300',
7980
className,
@@ -212,6 +213,6 @@ export const Order = ({ orderData, allowedDenoms, className }: OrderProps) => {
212213
}}
213214
/>
214215
)}
215-
</div>
216+
</>
216217
);
217218
};

0 commit comments

Comments
 (0)