-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
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][ListItem] Document *Component
and *Props
props deprecations
#42263
[material-ui][ListItem] Document *Component
and *Props
props deprecations
#42263
Conversation
|
||
### ContainerComponent | ||
|
||
The ListItem's `ContainerComponent` prop was deprecated in favor of `slots.root` or `component` instead. |
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.
slots.root
and component
are not a direct replacement for ContainerComponent
, since the latter was only rendered if the consumers was using ListItemSecondaryAction
, but not sure it's worth going into more detail here.
Netlify deploy previewBundle size report |
@@ -35,13 +35,13 @@ export interface ListItemBaseProps { | |||
/** | |||
* The container component used when a `ListItemSecondaryAction` is the last child. | |||
* @default 'li' | |||
* @deprecated | |||
* @deprecated Use the `component` or `slots.root` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details. |
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.
"Use the component
or slots.root
prop instead" is not semantically correct since slots.root
is not a prop, but I think it's ok. Let me know what you think.
636acca
to
5be838c
Compare
*Component
and *Props
prop deprecations
*Component
and *Props
prop deprecations*Component
and *Props
props deprecations
5be838c
to
a9e02fc
Compare
a9e02fc
to
e189029
Compare
ListItem
'sContainerComponent
andContainerProps
props were deprecated 3 years ago, but not officially in the docs. This PR just makes the deprecation official adding it to the docs.This deprecation goes hand in hand with
ListItemSecondaryAction
deprecation, so we should probably wait for #42251 to be merged first.Preview link: https://deploy-preview-42263--material-ui.netlify.app/material-ui/migration/migrating-from-deprecated-apis/#listitem