feathericons / react-feather

React component for Feather icons
https://npm.im/react-feather
MIT License
1.92k stars 126 forks source link

Icon width is shrinking #111

Open plsdev89 opened 8 months ago

plsdev89 commented 8 months ago

When using icon inside div, its width is shrinking. This is the sandbox to reproduce the issue. https://codesandbox.io/s/feather-icon-wrong-width-rn25rn?file=/src/App.js

As you can see from below screenshot, its width is 24.52. But I suppose that it should be 50 as I set size as 50.

To fix this problem, I have to set minWidth: 50 like this : <MoreHorizontal size="50" style={{ minWidth: 50 }} />. But I think that it's not good solution. Is there a better way to handle this? or Can it be resolved on react-feather library itself.

image