-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[material-ui][Divider] Add codemod for light
prop removal
#40947
Conversation
light
prop removallight
prop removal
Netlify deploy previewBundle size report |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this @sai6855!
Can I ask you to add the corresponding section to the migration guide and the link from the deprecated prop (see this example)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @sai6855!
Seems like we're missing the translations file update, like here: https://github.com/mui/material-ui/pull/40767/files#diff-6c46f30fbca62a52385ccf14faa91a405365deb460022c9b442475a84e5fbe4c
It should be updated by pnpm docs:api
I don't know why the CI didn't notice though 🤔
So,
Sorry missed this!! Done in this commit 78fc792 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some final details
The Divider's `light` prop was deprecated, Use `sx={{ opacity : "0.6" }}` (or any opacity). ([Codemod](https://github.com/mui/material-ui/tree/master/packages/mui-codemod#divider-props)): | ||
|
||
```diff | ||
<Accordion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<Accordion | |
<Divider |
@@ -30,7 +30,7 @@ export interface DividerOwnProps { | |||
/** | |||
* If `true`, the divider will have a lighter color. | |||
* @default false | |||
* @deprecated Use <Divider sx={{ bgcolor: '#eee' }} /> (or any color) instead. | |||
* @deprecated Use <Divider sx={{ bgcolor: '#eee' }} /> (or any color) instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that we added the codemod I would do:
* @deprecated Use <Divider sx={{ bgcolor: '#eee' }} /> (or any color) instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/) | |
* @deprecated Use <Divider sx={{ opacity: 0.6 }} /> (or any opacity or color) instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/) |
docs/data/material/migration/migrating-from-deprecated-apis/migrating-from-deprecated-apis.md
Outdated
Show resolved
Hide resolved
docs/data/material/migration/migrating-from-deprecated-apis/migrating-from-deprecated-apis.md
Outdated
Show resolved
Hide resolved
Signed-off-by: Diego Andai <diego@mui.com>
part of #40417
preview: https://deploy-preview-40947--material-ui.netlify.app/material-ui/migration/migrating-from-deprecated-apis