From 146f943d4837819f97610c79ccb7013bb50f5e3f Mon Sep 17 00:00:00 2001 From: siriwatknp Date: Wed, 26 Jun 2024 20:44:00 +0700 Subject: [PATCH] remove useDefaultProps from PigmentGrid --- .../mui-material/src/PigmentGrid/PigmentGrid.tsx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/packages/mui-material/src/PigmentGrid/PigmentGrid.tsx b/packages/mui-material/src/PigmentGrid/PigmentGrid.tsx index 1ac7476917e995..1165fc7afc69d5 100644 --- a/packages/mui-material/src/PigmentGrid/PigmentGrid.tsx +++ b/packages/mui-material/src/PigmentGrid/PigmentGrid.tsx @@ -13,7 +13,6 @@ import { generateSpacingClassNames, } from '@mui/system/Unstable_Grid/gridGenerator'; import { Breakpoint, Theme } from '../styles'; -import { useDefaultProps } from '../DefaultPropsProvider'; type ResponsiveStyleValue = T | Array | { [key in Breakpoint]?: T | null }; @@ -152,17 +151,12 @@ const useUtilityClasses = (ownerState: GridBaseProps) => { * * - [PigmentGrid API](https://next.mui.com/material-ui/api/pigment-grid/) */ -const PigmentGrid = React.forwardRef(function PigmentGrid(inProps, ref) { - const props = useDefaultProps({ - props: inProps, - // eslint-disable-next-line material-ui/mui-name-matches-component-name - name: 'MuiGrid2', - }); - const { className, component, ...other } = props; +const PigmentGrid = React.forwardRef(function PigmentGrid(props, ref) { + const { className, ...other } = props; const classes = useUtilityClasses(props); - return ; + return ; }) as OverridableComponent; PigmentGrid.propTypes /* remove-proptypes */ = {