-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
Issue summary
The recommended way to use a custom icon is to do something like this
import icon from "./icon.svg";
import { Icon } from "@shopify/polaris";
<Icon source={icon} />
Create React App v2 uses SVGr to create react components out of svg imports.
I may just be being dumb, but I don't see any way to make the two libraries work with each other.
Expected behavior
It would be nice if <Icon source />
supported the react components generated by SVGr, but really any solution of getting custom icons into Polaris when using CRA2 would be great.
Actual behavior
You get no result from <Icon/>
Steps to reproduce the problem
- create a new CRA app
- attempt to use a custom SVG with
Icon
Specifications
- Are you using the React components? (Y/N): Y
- Polaris version number: tried on both latest version of 2, and 3 beta
- Browser: Chrome 69
- Device: Macbook Pro
- Operating System: OSX
⚓️ We’re not accepting pull requests at this time
🗒 We are accepting issue reports and feature requests
🌟 Feature requests that we can’t get to right away will be closed. However, we track all requests and will use it to set priorities. See the contribution guidelines for more information.
Metadata
Metadata
Assignees
Labels
No labels