-
Notifications
You must be signed in to change notification settings - Fork 85
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
feat(typography): allow listitem to inherit variant from parent list #7124
Conversation
67bb644
to
da0aa5e
Compare
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.
Looks good to me, my only comment would be that I don't believe this is a breaking change just yet if we are only adding a deprecation warning to ListItem
and the prop is still available.
In order to reduce replication of code, ListItem now receives information on the variant of the parent List item via context; setting variant on List will pass it to child ListItem components. Resolves #5413
da0aa5e
to
ad4f4e7
Compare
🎉 This PR is included in version 144.22.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
In order to reduce replication of code, ListItem now receives information on the variant of the parent List item via context; setting variant on List will pass it to child ListItem components.
Resolves #5413
Proposed behaviour
ListItem
now inheritsvariant
directly from it's parentList
componentCurrent behaviour
Customers have to manually define the
variant
on eachListItem
Checklist
QA
Testing instructions
Use Storybook to view the new approach/component structure. Additionally, verify that a deprecation warning is thrown if
variant
is added to anyListItem