From 787f154390fc0ed5ce7673090313de411d4804d5 Mon Sep 17 00:00:00 2001 From: Benny Joo Date: Tue, 1 Nov 2022 11:41:56 +0000 Subject: [PATCH] [Chip] Add optional component prop to each slot in ComponentsProps --- packages/mui-joy/src/Chip/ChipProps.ts | 27 +++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/packages/mui-joy/src/Chip/ChipProps.ts b/packages/mui-joy/src/Chip/ChipProps.ts index 9ef5020cf985e1..c2842929a6dc43 100644 --- a/packages/mui-joy/src/Chip/ChipProps.ts +++ b/packages/mui-joy/src/Chip/ChipProps.ts @@ -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

{