Skip to content

Commit

Permalink
remove useDefaultProps from PigmentGrid
Browse files Browse the repository at this point in the history
  • Loading branch information
siriwatknp committed Jun 26, 2024
1 parent 6cd978a commit 146f943
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions packages/mui-material/src/PigmentGrid/PigmentGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
generateSpacingClassNames,
} from '@mui/system/Unstable_Grid/gridGenerator';
import { Breakpoint, Theme } from '../styles';
import { useDefaultProps } from '../DefaultPropsProvider';

type ResponsiveStyleValue<T> = T | Array<T | null> | { [key in Breakpoint]?: T | null };

Expand Down Expand Up @@ -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<typeof inProps & { component?: React.ElementType }>({
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 <Grid ref={ref} as={component} className={clsx(classes.root, className)} {...other} />;
return <Grid ref={ref} className={clsx(classes.root, className)} {...other} />;
}) as OverridableComponent<GridTypeMap>;

PigmentGrid.propTypes /* remove-proptypes */ = {
Expand Down

0 comments on commit 146f943

Please sign in to comment.