Replies: 1 comment 4 replies
-
Hello @jkinley. I think you could achieve it using SVG Props Options without custom template. --svg-props height="{props.size || '1em'}" --svg-props width="{props.size || '1em'}" Not sure if it works. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In an icon library you don't really want the aspect ratio to change. How can I add a custom size prop to SVGR so that I don't have to set a height and width? So in my component I could use
<Icon size={24} />
. Do I use a custom template for this? Any examples handy?Beta Was this translation helpful? Give feedback.
All reactions