chakra-ui / chakra-ui-docs

Documentation website for chakra ui
https://chakra-ui.com
MIT License
303 stars 475 forks source link

Instructions for how to use an imported svg file with <Icon> component #1458

Closed nick-inkeep closed 1 year ago

nick-inkeep commented 1 year ago

Subject

Icon

Description

The examples used for https://chakra-ui.com/docs/components/icon/usage#using-the-createicon-function don't show how to use imported svg files.

The 'recommendation' says how to export icons as svg from Figma/Sketch, but does not provide guidance on how one would use that svg.

noobinthisgame commented 1 year ago

Hi @nick-inkeep,

the recommendation is meant as an alternative to the createIcon function. You can easily use your own svg like this https://github.com/chakra-ui/chakra-ui-docs/blob/main/src/components/logo.tsx with Chakra UI.

Closing this for now. Let me know if this was helpful :)