aykutkardas / react-icomoon

It makes it very simple to use SVG icons in your React and React-Native projects.
https://svgps.app
MIT License
216 stars 22 forks source link

Fix static height value of viewBox #22

Closed aykutkardas closed 2 years ago

aykutkardas commented 2 years ago

https://github.com/aykutkardas/react-icomoon/blob/master/src/index.tsx#L66

Current:

 props.viewBox = `0 0 ${width} 1024`;

Expected:

 props.viewBox = `0 0 ${width} ${width}`;
aykutkardas commented 2 years ago

This change may cause some problems. Suspended for now.

jtraub commented 2 years ago

@aykutkardas what problems can it cause?

aykutkardas commented 2 years ago

@aykutkardas what problems can it cause?

Icons are taken from icomoon at a fixed height. This prevents this part from being dynamic. Because only a limited part of the icon is visible.

I was working on an alternative svg parser tool to Icomoon and so I wanted to do it but I don't need it anymore. So it's a trivial issue and now react-icomoon works pretty stable.