[Feature Request] Generate standalone IconComponent per icon type #102
Replies: 6 comments
-
Do you want to create a PR? |
Beta Was this translation helpful? Give feedback.
-
How do you think should look like original icon, as a handlebar template? |
Beta Was this translation helpful? Give feedback.
-
The issue with your suggestion, in general, is that it will increase the bundle code size because we generate additional components. |
Beta Was this translation helpful? Give feedback.
-
In the current implementation we support tree-shaking, so what's the benefit of your suggestion? |
Beta Was this translation helpful? Give feedback.
-
It allows usage of specific icons - instead of specifying key='leftArrow' we can use LeftArrowIcon, without any registry. Also it will be safer, now key of svg-icon is string, not the actual icon type |
Beta Was this translation helpful? Give feedback.
-
I understand this, but on the other side, it will increase your bundle size. I don't mind leaving this decision to the consumer. |
Beta Was this translation helpful? Give feedback.
-
<!-
I'm submitting a...
Current behavior
One single IconComponent with support for icon types
Expected behavior
Multiple IconComponents, declared as standalone. They will not have input iconType, but will directly use SVG.
As they will be declared as standalone, it will be a tree shakable solution as well
Beta Was this translation helpful? Give feedback.
All reactions