feathericons / react-feather

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

Why strokeWidth is not be passed as a property? #83

Open vineetdigit opened 3 years ago

vineetdigit commented 3 years ago

This is more of a question rather than an issue. But I see that for all icons, the strokeWidth is always set to 2. Except for the size and stroke, almost all SVG properties are directly assigned. Is the expectation to change them with CSS?

dexterthemsb commented 3 years ago

You can pass strokeWidth as props. It'll just override the default value of 2. The library is using a spreader operator to apply properties other than size, color, etc.