Skip to content

Commit

Permalink
Sort README deprecations alphabetically
Browse files Browse the repository at this point in the history
  • Loading branch information
aarongarciah committed May 23, 2024
1 parent 6a9c3fb commit 454d920
Showing 1 changed file with 74 additions and 75 deletions.
149 changes: 74 additions & 75 deletions packages/mui-codemod/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -983,6 +983,32 @@ npx @mui/codemod@next deprecations/form-control-label-props <path>

```

#### `list-item-props`

```diff
<ListItem
- components={{ Root: CustomRoot }}
+ slots={{ root: CustomRoot }}
- componentsProps={{ root: { testid: 'test-id' } }}
+ slotProps={{ root: { testid: 'test-id' } }}
/>
```

```diff
MuiListItem: {
defaultProps: {
- components: { Root: CustomRoot }
+ slots: { root: CustomRoot },
- componentsProps: { root: { testid: 'test-id' }}
+ slotProps: { root: { testid: 'test-id' } },
},
},
```

```bash
npx @mui/codemod@next deprecations/list-item-props <path>
```

#### `pagination-item-classes`

JS transforms:
Expand Down Expand Up @@ -1095,66 +1121,29 @@ npx @mui/codemod@next deprecations/pagination-item-props <path>
npx @mui/codemod@next deprecations/slider-props <path>
```

#### `text-field-props`

```diff
<TextField
- InputProps={CustomInputProps}
- inputProps={CustomHtmlInputProps}
- SelectProps={CustomSelectProps}
- InputLabelProps={CustomInputLabelProps}
- FormHelperTextProps={CustomFormHelperProps}
+ slotProps={{
+ input: CustomInputProps
+ htmlInput: CustomHtmlInputProps
+ select: CustomSelectProps
+ inputLabel: CustomInputLabelProps
+ formHelper: CustomFormHelperProps
+ }}
/>
```

```bash
npx @mui/codemod@next deprecations/text-field-props <path>
```

#### `toggle-button-group-classes`
#### `step-connector-classes`

JS transforms:

```diff
import { toggleButtonGroupClasses } from '@mui/material/ToggleButtonGroup';
import { stepConnectorClasses } from '@mui/material/StepConnector';

MuiToggleButtonGroup: {
MuiStepConnector: {
styleOverrides: {
root: {
- [`& .${toggleButtonGroupClasses.groupedHorizontal}`]: {
+ [`&.${toggleButtonGroupClasses.horizontal} > .${toggleButtonGroupClasses.grouped}`]: {
- [`& .${stepConnectorClasses.lineHorizontal}`]: {
+ [`&.${stepConnectorClasses.horizontal} > .${stepConnectorClasses.line}`]: {
color: 'red',
},
- [`& .${toggleButtonGroupClasses.groupedVertical}`]: {
+ [`&.${toggleButtonGroupClasses.vertical} > .${toggleButtonGroupClasses.grouped}`]: {
- [`& .${stepConnectorClasses.lineVertical}`]: {
+ [`&.${stepConnectorClasses.vertical} > .${stepConnectorClasses.line}`]: {
color: 'red',
},
},
},
},
```

CSS transforms:

```diff
-.MuiToggleButtonGroup-root .MuiToggleButtonGroup-groupedHorizontal
+.MuiToggleButtonGroup-root.MuiToggleButtonGroup-horizontal > .MuiToggleButtonGroup-grouped
-.MuiToggleButtonGroup-root .MuiToggleButtonGroup-groupedVertical
+.MuiToggleButtonGroup-root.MuiToggleButtonGroup-vertical > .MuiToggleButtonGroup-grouped
/>
```

```bash
npx @mui/codemod@latest deprecations/toggle-button-group-classes <path>
```

#### `step-label-props`

```diff
Expand Down Expand Up @@ -1183,25 +1172,47 @@ npx @mui/codemod@latest deprecations/toggle-button-group-classes <path>

```bash
npx @mui/codemod@latest deprecations/step-label-props <path>
```

#### `text-field-props`

```diff
<TextField
- InputProps={CustomInputProps}
- inputProps={CustomHtmlInputProps}
- SelectProps={CustomSelectProps}
- InputLabelProps={CustomInputLabelProps}
- FormHelperTextProps={CustomFormHelperProps}
+ slotProps={{
+ input: CustomInputProps
+ htmlInput: CustomHtmlInputProps
+ select: CustomSelectProps
+ inputLabel: CustomInputLabelProps
+ formHelper: CustomFormHelperProps
+ }}
/>
```

#### `step-connector-classes`
```bash
npx @mui/codemod@next deprecations/text-field-props <path>
```

#### `toggle-button-group-classes`

JS transforms:

```diff
import { stepConnectorClasses } from '@mui/material/StepConnector';
import { toggleButtonGroupClasses } from '@mui/material/ToggleButtonGroup';

MuiStepConnector: {
MuiToggleButtonGroup: {
styleOverrides: {
root: {
- [`& .${stepConnectorClasses.lineHorizontal}`]: {
+ [`&.${stepConnectorClasses.horizontal} > .${stepConnectorClasses.line}`]: {
- [`& .${toggleButtonGroupClasses.groupedHorizontal}`]: {
+ [`&.${toggleButtonGroupClasses.horizontal} > .${toggleButtonGroupClasses.grouped}`]: {
color: 'red',
},
- [`& .${stepConnectorClasses.lineVertical}`]: {
+ [`&.${stepConnectorClasses.vertical} > .${stepConnectorClasses.line}`]: {
- [`& .${toggleButtonGroupClasses.groupedVertical}`]: {
+ [`&.${toggleButtonGroupClasses.vertical} > .${toggleButtonGroupClasses.grouped}`]: {
color: 'red',
},
},
Expand All @@ -1212,40 +1223,28 @@ JS transforms:
CSS transforms:

```diff
- .MuiStepConnector-lineHorizontal
+.MuiStepConnector-horizontal > .MuiStepConnector-line
- .MuiStepConnector-lineVertical
+.MuiStepConnector-vertical > .MuiStepConnector-line
-.MuiToggleButtonGroup-root .MuiToggleButtonGroup-groupedHorizontal
+.MuiToggleButtonGroup-root.MuiToggleButtonGroup-horizontal > .MuiToggleButtonGroup-grouped
-.MuiToggleButtonGroup-root .MuiToggleButtonGroup-groupedVertical
+.MuiToggleButtonGroup-root.MuiToggleButtonGroup-vertical > .MuiToggleButtonGroup-grouped
/>
```

```bash
npx @mui/codemod@next deprecations/step-connector-classes <path>
npx @mui/codemod@latest deprecations/toggle-button-group-classes <path>
```

#### `list-item-props`

```diff
<ListItem
- components={{ Root: CustomRoot }}
+ slots={{ root: CustomRoot }}
- componentsProps={{ root: { testid: 'test-id' } }}
+ slotProps={{ root: { testid: 'test-id' } }}
/>
```
CSS transforms:

```diff
MuiListItem: {
defaultProps: {
- components: { Root: CustomRoot }
+ slots: { root: CustomRoot },
- componentsProps: { root: { testid: 'test-id' }}
+ slotProps: { root: { testid: 'test-id' } },
},
},
- .MuiStepConnector-lineHorizontal
+.MuiStepConnector-horizontal > .MuiStepConnector-line
- .MuiStepConnector-lineVertical
+.MuiStepConnector-vertical > .MuiStepConnector-line
```

```bash
npx @mui/codemod@next deprecations/list-item-props <path>
npx @mui/codemod@next deprecations/step-connector-classes <path>
```

### v6.0.0
Expand Down

0 comments on commit 454d920

Please sign in to comment.