Shopify / ui-extensions

MIT License
266 stars 36 forks source link

[UI Extensions] Custom SVG source for Icon #1310

Open gil-- opened 1 year ago

gil-- commented 1 year ago

Please list the related package(s)

admin-ui-extensions-react checkout-ui-extensions-react

If this related to specific APIs or components, please list them here

Icon component across admin and checkout

Is your feature request related to a problem? Please describe.

Need to show custom SVG icons not included with Shopify's default library on 3p app integrations.

Describe the changes you are looking for

Add a source prop on the Icon component to accept custom similar to Polaris.

Describe alternatives you’ve considered

Using inline SVG via <Image /> but it can't leverage color since there's no ability to use currentColor on an Image.

Additional context

https://polaris.shopify.com/components/images-and-icons/icon

gidiuselava commented 10 months ago

We really need this as well.

s-prestele-tqgg commented 5 months ago

Is there any update to this yet? We also need this.

edhgoose commented 3 months ago

We would also love SVG support - or at the very least guidance on how best to manage external imagery.

We've instead opted to add an image to our CDN, then use:

<Image source="https://our-cdn.com/an.svg" />

But I'm concerned that this won't work well in cases where clients have applied custom branding - e.g. choosing a darker background. It would be amazing to have guidance on how best to handle this case.