-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Export svg icons as a part of the npm module #385
Comments
Hi @sivakumar-kailasam, thanks for raising this request. We intend to decouple the icons from the React component library, but we don't have a timeline for when they'll be available to consume separately at this time. For now I'd recommend cloning this repo so you can access and save the icons in your projects as needed. We treat all feature requests as part of our backlog, so I’ll close this issue for now. We encourage everyone who wants this feature to add a 👍 to the original issue report. We take your collective interest into account when we look at what to work on next. 💜 |
@chloerice I've seen that |
Hey Andy, thanks for asking! We were just asking ourselves what the best way to enable non-React apps to use icons via Aside from needing SVG files, can we make any pre-transforms that would help? (for example, we could pre-remove |
Reopening this as this is not only a feature request but also could be considered a regression since #1042. |
Thanks @kaelig! I think with the pre-transforms you mention is probably the most useful, so that we can use the icons and have them look the same as they do in the React components 🙂 |
Hi folks, thanks for your patience. Check runpkg to see the new contents: https://runpkg.com/?@shopify/polaris-icons@3.4.0/images/abandoned-cart_major_monotone.svg |
Issue summary
For anyone who's not using React & wants to use Polaris, one of the hurdles to get through is using the icons from the current node module since they're inlined inside the main module.
Expected behavior
Icons are exported alongside styles folder as svg files.
Actual behavior
Steps to reproduce the problem
@shopify/polaris
in any frontend app with yarn/npmnode_modules/@shopify/polaris/index.js
. All the icons are inlined inside a massive module that requires libraries from the react ecosystemSpecifications
The text was updated successfully, but these errors were encountered: