Skip to content

Commit

Permalink
[Chip] Add optional component prop to each slot in ComponentsProps
Browse files Browse the repository at this point in the history
  • Loading branch information
hbjORbj committed Nov 1, 2022
1 parent c80a4ca commit 787f154
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions packages/mui-joy/src/Chip/ChipProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,32 @@ export interface ChipPropsSizeOverrides {}
export interface ChipPropsVariantOverrides {}

interface ComponentsProps {
root?: SlotComponentProps<'div', { sx?: SxProps }, ChipOwnerState>;
label?: SlotComponentProps<'span', { sx?: SxProps }, ChipOwnerState>;
root?: SlotComponentProps<'div', { component?: React.ElementType; sx?: SxProps }, ChipOwnerState>;
label?: SlotComponentProps<
'span',
{ component?: React.ElementType; sx?: SxProps },
ChipOwnerState
>;
action?: SlotComponentProps<
'button',
{ sx?: SxProps; component?: React.ElementType; href?: string; to?: string },
{
component?: React.ElementType;
sx?: SxProps;
href?: string;
to?: string;
},
ChipOwnerState
>;
startDecorator?: SlotComponentProps<
'span',
{ component?: React.ElementType; sx?: SxProps },
ChipOwnerState
>;
endDecorator?: SlotComponentProps<
'span',
{ component?: React.ElementType; sx?: SxProps },
ChipOwnerState
>;
startDecorator?: SlotComponentProps<'span', { sx?: SxProps }, ChipOwnerState>;
endDecorator?: SlotComponentProps<'span', { sx?: SxProps }, ChipOwnerState>;
}

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

0 comments on commit 787f154

Please sign in to comment.