@@ -3,13 +3,13 @@ import PropTypes from 'prop-types';
3
3
import { OverridableComponent } from '@mui/types' ;
4
4
import { unstable_capitalize as capitalize , unstable_useForkRef as useForkRef } from '@mui/utils' ;
5
5
import { unstable_composeClasses as composeClasses , useButton } from '@mui/base' ;
6
- import { useSlotProps } from '@mui/base/utils' ;
7
6
import { useThemeProps } from '../styles' ;
8
7
import styled from '../styles/styled' ;
9
8
import Cancel from '../internal/svg-icons/Cancel' ;
10
9
import chipDeleteClasses , { getChipDeleteUtilityClass } from './chipDeleteClasses' ;
11
10
import { ChipDeleteProps , ChipDeleteOwnerState , ChipDeleteTypeMap } from './ChipDeleteProps' ;
12
11
import ChipContext from '../Chip/ChipContext' ;
12
+ import useSlot from '../utils/useSlot' ;
13
13
14
14
const useUtilityClasses = ( ownerState : ChipDeleteOwnerState ) => {
15
15
const { focusVisible, variant, color, disabled } = ownerState ;
@@ -70,7 +70,6 @@ const ChipDelete = React.forwardRef(function ChipDelete(inProps, ref) {
70
70
} ) ;
71
71
72
72
const {
73
- component,
74
73
children,
75
74
variant : variantProp ,
76
75
color : colorProp ,
@@ -101,19 +100,16 @@ const ChipDelete = React.forwardRef(function ChipDelete(inProps, ref) {
101
100
102
101
const classes = useUtilityClasses ( ownerState ) ;
103
102
104
- const rootProps = useSlotProps ( {
103
+ const [ SlotRoot , rootProps ] = useSlot ( 'root' , {
104
+ ref,
105
+ className : classes . root ,
105
106
elementType : ChipDeleteRoot ,
106
- getSlotProps : getRootProps ,
107
- externalSlotProps : { } ,
108
107
externalForwardedProps : other ,
109
108
ownerState,
110
- additionalProps : {
111
- as : component ,
112
- } ,
113
- className : classes . root ,
109
+ getSlotProps : getRootProps ,
114
110
} ) ;
115
111
116
- return < ChipDeleteRoot { ...rootProps } > { children ?? < Cancel /> } </ ChipDeleteRoot > ;
112
+ return < SlotRoot { ...rootProps } > { children ?? < Cancel /> } </ SlotRoot > ;
117
113
} ) as OverridableComponent < ChipDeleteTypeMap > ;
118
114
119
115
ChipDelete . propTypes /* remove-proptypes */ = {
0 commit comments