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: Icon parent wrapper element/component #720
base: master
Are you sure you want to change the base?
Conversation
component with a class name
Hey @kamijin-fanta , anyone could take a look at this PR? |
Any takers? @kamijin-fanta @gorangajic @nolanleung |
It is unclear if a merge should be performed because the use case is not known. You could write code |
Hey, imagine the case where we wish to apply a custom styling/wrapper to every icon class we import to control their global behavior. How would one currently apply such a wrapper to all icons? Must one create the custom class or wrapper component on every icon instance component used in the code? That is what this PR tries to address, by incorporating the logic into the icons and context one can globally control the icons. |
There is still the ability to globally assign class names. Whether it is necessary to wrap components depends on the situation in which they will be used. I would like to know in what cases it is necessary to wrap repeatedly. |
For UI purposes, we want to wrap any and all react icons we import from Imagine I use the |
Think of it as difficult to add features that are not used very often. If such UI frameworks are used a lot in the React community, I would welcome them. However, when merging, the API should accept generic React components, not just span. |
I can agree with that, I will fix to make the wrapper component generic. 👍 |
Hey @kamijin-fanta, I updated the functionality; please review it to see if it looks better. |
component dynamically and assign className
Hey @kamijin-fanta , the new implementation aligns to using generic React components rather than hardcode the wrapper to span. |
Hey @kamijin-fanta , any feedback? |
Hey @kamijin-fanta , any update on if this feature can be merged? |
If anyone else needs it, please let me know the use case. I will not add a feature that only one person needs. |
Fair enough, I'll leave it open in case, we've made it work for use using |
039502a
to
399b45c
Compare
Resolves #719