You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The widgets lib currently has a growing pile of icons in the form of React components.
The advantage of the current system is that:
By having the icons as React components, they can be easily tweaked (color, size) by the lib consumers
By keeping a custom set, we have full control over the icons
However, it's tedious to keep converting SVGs to components and adding them to the lib manually. Maybe there are better alternatives.
We could use an icon library but it would lock us in to their style and (depending on the lib) may add bundle bloat. Or maybe we should just include the SVGs and have SVGO auto-generate the react components. I tried this in the past but it required a barrel export to work (e.g. export * from icons) which broke tree-shaking for the lib in some bundlers.
The text was updated successfully, but these errors were encountered:
The widgets lib currently has a growing pile of icons in the form of React components.
The advantage of the current system is that:
However, it's tedious to keep converting SVGs to components and adding them to the lib manually. Maybe there are better alternatives.
We could use an icon library but it would lock us in to their style and (depending on the lib) may add bundle bloat. Or maybe we should just include the SVGs and have SVGO auto-generate the react components. I tried this in the past but it required a barrel export to work (e.g.
export * from icons
) which broke tree-shaking for the lib in some bundlers.The text was updated successfully, but these errors were encountered: