Skip to content

Commit 787f154

Browse files
committed
[Chip] Add optional component prop to each slot in ComponentsProps
1 parent c80a4ca commit 787f154

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

packages/mui-joy/src/Chip/ChipProps.ts

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,32 @@ export interface ChipPropsSizeOverrides {}
1010
export interface ChipPropsVariantOverrides {}
1111

1212
interface ComponentsProps {
13-
root?: SlotComponentProps<'div', { sx?: SxProps }, ChipOwnerState>;
14-
label?: SlotComponentProps<'span', { sx?: SxProps }, ChipOwnerState>;
13+
root?: SlotComponentProps<'div', { component?: React.ElementType; sx?: SxProps }, ChipOwnerState>;
14+
label?: SlotComponentProps<
15+
'span',
16+
{ component?: React.ElementType; sx?: SxProps },
17+
ChipOwnerState
18+
>;
1519
action?: SlotComponentProps<
1620
'button',
17-
{ sx?: SxProps; component?: React.ElementType; href?: string; to?: string },
21+
{
22+
component?: React.ElementType;
23+
sx?: SxProps;
24+
href?: string;
25+
to?: string;
26+
},
27+
ChipOwnerState
28+
>;
29+
startDecorator?: SlotComponentProps<
30+
'span',
31+
{ component?: React.ElementType; sx?: SxProps },
32+
ChipOwnerState
33+
>;
34+
endDecorator?: SlotComponentProps<
35+
'span',
36+
{ component?: React.ElementType; sx?: SxProps },
1837
ChipOwnerState
1938
>;
20-
startDecorator?: SlotComponentProps<'span', { sx?: SxProps }, ChipOwnerState>;
21-
endDecorator?: SlotComponentProps<'span', { sx?: SxProps }, ChipOwnerState>;
2239
}
2340

2441
export interface ChipTypeMap<P = {}, D extends React.ElementType = 'div'> {

0 commit comments

Comments
 (0)