From a48ce0024c5b25ccf1a44a02be2c67d1c80945ff Mon Sep 17 00:00:00 2001 From: Diego Andai Date: Mon, 19 Aug 2024 06:29:11 -0400 Subject: [PATCH] [codemod] Add Grid2 to removeSystemProps codemod (#43302) --- .../mui-codemod/src/v6.0.0/system-props/removeSystemProps.js | 2 +- .../v6.0.0/system-props/test-cases/system-props.actual.js | 3 ++- .../v6.0.0/system-props/test-cases/system-props.expected.js | 5 ++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/mui-codemod/src/v6.0.0/system-props/removeSystemProps.js b/packages/mui-codemod/src/v6.0.0/system-props/removeSystemProps.js index 421fb32f5c9b0e..7169f450e9d207 100644 --- a/packages/mui-codemod/src/v6.0.0/system-props/removeSystemProps.js +++ b/packages/mui-codemod/src/v6.0.0/system-props/removeSystemProps.js @@ -129,7 +129,7 @@ const defaultSxConfig = { typography: {}, }; const systemProps = Object.keys(defaultSxConfig); -const components = ['Box', 'Stack', 'Typography', 'Link', 'Grid']; +const components = ['Box', 'Stack', 'Typography', 'Link', 'Grid', 'Grid2']; /** * @param {import('jscodeshift').FileInfo} file diff --git a/packages/mui-codemod/src/v6.0.0/system-props/test-cases/system-props.actual.js b/packages/mui-codemod/src/v6.0.0/system-props/test-cases/system-props.actual.js index 71163fe44f369d..87c7b11fe142fd 100644 --- a/packages/mui-codemod/src/v6.0.0/system-props/test-cases/system-props.actual.js +++ b/packages/mui-codemod/src/v6.0.0/system-props/test-cases/system-props.actual.js @@ -1,4 +1,4 @@ -import { Box as Boxxx, Grid as Griddd } from '@mui/material'; +import { Box as Boxxx, Grid as Griddd, Grid2 as Griddd2 } from '@mui/material'; import Typographyyy from '@mui/material/Typography'; import Stackkk from '@mui/material/Stack'; @@ -6,6 +6,7 @@ import Stackkk from '@mui/material/Stack'; ; ; +; const sx = { display: 'flex' }; const ml = 2; diff --git a/packages/mui-codemod/src/v6.0.0/system-props/test-cases/system-props.expected.js b/packages/mui-codemod/src/v6.0.0/system-props/test-cases/system-props.expected.js index e137ecc15e479b..cdbc730fcc0e65 100644 --- a/packages/mui-codemod/src/v6.0.0/system-props/test-cases/system-props.expected.js +++ b/packages/mui-codemod/src/v6.0.0/system-props/test-cases/system-props.expected.js @@ -1,4 +1,4 @@ -import { Box as Boxxx, Grid as Griddd } from '@mui/material'; +import { Box as Boxxx, Grid as Griddd, Grid2 as Griddd2 } from '@mui/material'; import Typographyyy from '@mui/material/Typography'; import Stackkk from '@mui/material/Stack'; @@ -14,6 +14,9 @@ import Stackkk from '@mui/material/Stack'; ; +; const sx = { display: 'flex' }; const ml = 2;