-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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: add prop right to List Accordion #2531
Conversation
Can someone please merge this PR? This is a great addition. |
Hey @Joeao, I understand the purpose of that PR, however I'm afraid it's against principles. I was not able to find the clarification on MaterialDesign documentation whether the icon on the right in |
Hi @lukewalczak. In my case it's not that I want to use an icon other than Chevron up/down, it's that I want to avoid using The intention of this PR isn't to go against Material Design principals, but to allow for more flexibility in icon library choices. I could have mentioned that in my initial comment but I hadn't been thinking about principals. I now see that the issue I referenced suggests going against the principals, for that I condemn it and refuse to have this PR be associated with it any longer! I know that the RNP documentation says that some components may render incorrectly if not using the default icons, but it'd be nice to be able to reduce that as much as possible which this PR would do in one case. As to whether or not RNP would like to tackle the issue of icon replacement either in a different way or not at all is up to you and the Callstack team. If this PR is a suboptimal way to address the problem right now then feel free to close. I can say that my project would benefit from it as currently there is no Chevron, just an empty box, which definitely goes against the principals. But my individual case doesn't mean much against the 60+ thousand weekly download users who expect a robust, well supported component library that follows the principals that they know and love. |
Hey @Joeao thanks for your comment. I understand your point of view and your intention. I think since the |
Excellent, thank you very much! |
It seems like this feature is not present in the latest |
It's not released yet, in the meantime you can use package from main branch. |
Please do you know when it will be released? |
Hopefully until the end of the week 🤞🏽 |
New version is already release (4.8.0) |
Summary
This pull request addresses issue #2150. It gives users the flexibility to replace what's rendered on the right-hand-side of the accordion with their own component. The expanded state is passed back to the user so that they can render based on this value.
This feature draws inspiration from the
left
prop on the same component. Instead, this could have been addressed similarly to how Fab Icon is implemented, however the drawback is that the implementation of Fab Icon is a bit more complex when compared to theleft
prop of this component.Test plan
Render a
List.Accordion
component and pass in a separate component as theright
prop. E.g.Omitting this prop results in the default
MaterialCommunityIcon
element being rendered.