Skip to content

Commit

Permalink
Add Grid2 to removeSystemProps codemod
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoAndai committed Aug 14, 2024
1 parent 8968394 commit 6579d5c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
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';

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

<Griddd container flexDirection={`column`} />;
<Griddd2 container flexDirection={`column`} />;

const sx = { display: 'flex' };
const ml = 2;
Expand Down
Original file line number Diff line number Diff line change
@@ -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';

Expand All @@ -14,6 +14,9 @@ import Stackkk from '@mui/material/Stack';
<Griddd container sx={{
flexDirection: `column`
}} />;
<Griddd2 container sx={{
flexDirection: `column`
}} />;

const sx = { display: 'flex' };
const ml = 2;
Expand Down

0 comments on commit 6579d5c

Please sign in to comment.