-
-
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][Tooltip] Deprecate components and componentProps props for v6 #42107
Conversation
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.
Hey @ChronicusUA! Thanks for working on this as well.
A very similar review as #42111, let's discuss the EOL problem on that PR.
Use the [codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#tooltip-props) below to migrate the code as described in the following sections: | ||
|
||
```bash | ||
npx @mui/codemod@latest deprecations/tooltip-props <path> |
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.
npx @mui/codemod@latest deprecations/tooltip-props <path> | |
npx @mui/codemod@next deprecations/tooltip-props <path> |
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.
I can see that some docs for component have latest
and others have next
. For example Slider
(example PR for the main issue) has latest
. I will fix it for my PRs
|
||
### components | ||
|
||
The Tooltip's `components` was deprecated in favor of `slots`: |
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.
The Tooltip's `components` was deprecated in favor of `slots`: | |
The Tooltip's `components` prop was deprecated in favor of `slots`: |
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.
That word is missing for other component docs in the file. I will update my changes only
|
||
### componentsProps | ||
|
||
The Tooltip's `componentsProps` was deprecated in favor of `slotProps`: |
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.
The Tooltip's `componentsProps` was deprecated in favor of `slotProps`: | |
The Tooltip's `componentsProps` prop was deprecated in favor of `slotProps`: |
import Tooltip from '@mui/material/Tooltip'; | ||
|
||
<Tooltip | ||
components={{ Arrow: ComponentsArrow }} |
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.
Let's cover all slots (arrow
, popper
, tooltip
, transition
) on the test cases
4d12598
to
0cbf808
Compare
PR is updated |
packages/mui-codemod/src/deprecations/tooltip-props/tooltip-props.js
Outdated
Show resolved
Hide resolved
Signed-off-by: Diego Andai <diego@mui.com>
Thanks @ChronicusUA! |
Part of #41279
Deprecate components and componentsProps props for Tooltip component