@@ -3,13 +3,13 @@ import PropTypes from 'prop-types';
33import { OverridableComponent } from '@mui/types' ;
44import { unstable_capitalize as capitalize , unstable_useForkRef as useForkRef } from '@mui/utils' ;
55import { unstable_composeClasses as composeClasses , useButton } from '@mui/base' ;
6- import { useSlotProps } from '@mui/base/utils' ;
76import { useThemeProps } from '../styles' ;
87import styled from '../styles/styled' ;
98import Cancel from '../internal/svg-icons/Cancel' ;
109import chipDeleteClasses , { getChipDeleteUtilityClass } from './chipDeleteClasses' ;
1110import { ChipDeleteProps , ChipDeleteOwnerState , ChipDeleteTypeMap } from './ChipDeleteProps' ;
1211import ChipContext from '../Chip/ChipContext' ;
12+ import useSlot from '../utils/useSlot' ;
1313
1414const useUtilityClasses = ( ownerState : ChipDeleteOwnerState ) => {
1515 const { focusVisible, variant, color, disabled } = ownerState ;
@@ -70,7 +70,6 @@ const ChipDelete = React.forwardRef(function ChipDelete(inProps, ref) {
7070 } ) ;
7171
7272 const {
73- component,
7473 children,
7574 variant : variantProp ,
7675 color : colorProp ,
@@ -101,19 +100,16 @@ const ChipDelete = React.forwardRef(function ChipDelete(inProps, ref) {
101100
102101 const classes = useUtilityClasses ( ownerState ) ;
103102
104- const rootProps = useSlotProps ( {
103+ const [ SlotRoot , rootProps ] = useSlot ( 'root' , {
104+ ref,
105+ className : classes . root ,
105106 elementType : ChipDeleteRoot ,
106- getSlotProps : getRootProps ,
107- externalSlotProps : { } ,
108107 externalForwardedProps : other ,
109108 ownerState,
110- additionalProps : {
111- as : component ,
112- } ,
113- className : classes . root ,
109+ getSlotProps : getRootProps ,
114110 } ) ;
115111
116- return < ChipDeleteRoot { ...rootProps } > { children ?? < Cancel /> } </ ChipDeleteRoot > ;
112+ return < SlotRoot { ...rootProps } > { children ?? < Cancel /> } </ SlotRoot > ;
117113} ) as OverridableComponent < ChipDeleteTypeMap > ;
118114
119115ChipDelete . propTypes /* remove-proptypes */ = {
0 commit comments