Skip to content

Commit bc5b480

Browse files
authored
[material-ui][docs] Migrating from deprecated apis follow up (#40981)
1 parent 2321cf6 commit bc5b480

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

docs/data/material/migration/migrating-from-deprecated-apis/migrating-from-deprecated-apis.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Material UI provides the `deprecations/all` codemod to help you stay up to date
1616
npx @mui/codemod@latest deprecations/all <path>
1717
```
1818

19-
This command runs all the current [deprecations codemods](https://github.com/mui/material-ui/tree/master/packages/mui-codemod#deprecations), automatically migrating to the updated API.
19+
This command runs all the current [deprecations codemods](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#deprecations), automatically migrating to the updated API.
2020
You can run this codemod as often as necessary to keep up with the latest changes.
2121

2222
:::info
@@ -30,22 +30,22 @@ If you need to run a specific codemod, those are also linked below.
3030

3131
### TransitionComponent
3232

33-
The Accordion's `TransitionComponent` was deprecated in favor of `slots.transition` ([Codemod](https://github.com/mui/material-ui/tree/master/packages/mui-codemod#accordion-props)):
33+
The Accordion's `TransitionComponent` was deprecated in favor of `slots.transition` ([Codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#accordion-props)):
3434

3535
```diff
3636
<Accordion
37-
- TransitionComponent={CustomTransition}
38-
+ slots={{ transition: CustomTransition }}
37+
- TransitionComponent={CustomTransition}
38+
+ slots={{ transition: CustomTransition }}
3939
/>
4040
```
4141

4242
### TransitionProps
4343

44-
The Accordion's `TransitionProps` was deprecated in favor of `slotProps.transition` ([Codemod](https://github.com/mui/material-ui/tree/master/packages/mui-codemod#accordion-props)):
44+
The Accordion's `TransitionProps` was deprecated in favor of `slotProps.transition` ([Codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#accordion-props)):
4545

4646
```diff
4747
<Accordion
48-
- TransitionProps={{ unmountOnExit: true }}
49-
+ slotProps={{ transition: { unmountOnExit: true } }}
48+
- TransitionProps={{ unmountOnExit: true }}
49+
+ slotProps={{ transition: { unmountOnExit: true } }}
5050
/>
5151
```

docs/pages/material-ui/migration/migrating-from-deprecated-APIs.js renamed to docs/pages/material-ui/migration/migrating-from-deprecated-apis.js

File renamed without changes.

packages/mui-codemod/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ A combination of all deprecations.
8080

8181
```diff
8282
<Accordion
83-
- TransitionComponent={CustomTransition}
84-
- TransitionProps={{ unmountOnExit: true }}
85-
+ slots={{ transition: CustomTransition }}
86-
+ slotProps={{ transition: { unmountOnExit: true } }}
83+
- TransitionComponent={CustomTransition}
84+
- TransitionProps={{ unmountOnExit: true }}
85+
+ slots={{ transition: CustomTransition }}
86+
+ slotProps={{ transition: { unmountOnExit: true } }}
8787
/>
8888
```
8989

0 commit comments

Comments
 (0)