Skip to content

Commit a48ce00

Browse files
authored
[codemod] Add Grid2 to removeSystemProps codemod (#43302)
1 parent 8024fa5 commit a48ce00

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

packages/mui-codemod/src/v6.0.0/system-props/removeSystemProps.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ const defaultSxConfig = {
129129
typography: {},
130130
};
131131
const systemProps = Object.keys(defaultSxConfig);
132-
const components = ['Box', 'Stack', 'Typography', 'Link', 'Grid'];
132+
const components = ['Box', 'Stack', 'Typography', 'Link', 'Grid', 'Grid2'];
133133

134134
/**
135135
* @param {import('jscodeshift').FileInfo} file

packages/mui-codemod/src/v6.0.0/system-props/test-cases/system-props.actual.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
import { Box as Boxxx, Grid as Griddd } from '@mui/material';
1+
import { Box as Boxxx, Grid as Griddd, Grid2 as Griddd2 } from '@mui/material';
22
import Typographyyy from '@mui/material/Typography';
33
import Stackkk from '@mui/material/Stack';
44

55
<Boxxx typography="body1" />;
66
<Boxxx color="palette.main" sx={{ display: 'block' }} />;
77

88
<Griddd container flexDirection={`column`} />;
9+
<Griddd2 container flexDirection={`column`} />;
910

1011
const sx = { display: 'flex' };
1112
const ml = 2;

packages/mui-codemod/src/v6.0.0/system-props/test-cases/system-props.expected.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Box as Boxxx, Grid as Griddd } from '@mui/material';
1+
import { Box as Boxxx, Grid as Griddd, Grid2 as Griddd2 } from '@mui/material';
22
import Typographyyy from '@mui/material/Typography';
33
import Stackkk from '@mui/material/Stack';
44

@@ -14,6 +14,9 @@ import Stackkk from '@mui/material/Stack';
1414
<Griddd container sx={{
1515
flexDirection: `column`
1616
}} />;
17+
<Griddd2 container sx={{
18+
flexDirection: `column`
19+
}} />;
1720

1821
const sx = { display: 'flex' };
1922
const ml = 2;

0 commit comments

Comments
 (0)