Skip to content
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

Investigation: Improve widget icon management #5329

Open
jmrossy opened this issue Jan 29, 2025 · 0 comments
Open

Investigation: Improve widget icon management #5329

jmrossy opened this issue Jan 29, 2025 · 0 comments

Comments

@jmrossy
Copy link
Contributor

jmrossy commented Jan 29, 2025

The widgets lib currently has a growing pile of icons in the form of React components.

The advantage of the current system is that:

  1. By having the icons as React components, they can be easily tweaked (color, size) by the lib consumers
  2. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant