Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[codemod] Add Grid2 to removeSystemProps codemod #43302

Merged
merged 2 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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