Feature Request: Expose `strokeWidth` as an (optional) prop - JavaScript react-feather

Description

On the feather icons website there are "customization" controls for previewing the icons. The options for the controls are: * Size * Stroke width * Color

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!

Asked Oct 06 '21 20:10
avatar zstix
zstix

1 Answer:

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.

1
Answered Jan 10 '21 at 06:16
avatar  of dexterthemsb
dexterthemsb