feathericons / react-feather

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

Feature Request: Expose `strokeWidth` as an (optional) prop #80

Closed zstix closed 3 years ago

zstix commented 3 years ago

Description

On the feather icons website there are "customization" controls for previewing the icons. The options for the controls are:

Currently, only size and color are exposed as props. It looks like the strokeWidth for each icon is being hard-coded as 2 (example).

This seems like a fairly straightforward adjustment. If you're accepting PRs, I'd be happy to add it!

dexterthemsb commented 3 years ago

You can pass strokeWidth as props. In the example on line 17, { ...rest } is used. So any props (other than exposed props) you pass are applied to the icon. If you pass strokeWidth as a prop it'll override the previously defined attribute of 2.