Closed cachilders closed 6 years ago
Hey!
Cheers, sounds like a addition that could be useful. I guess for the most parts passing in a className
would do the trick, but I guess sometimes it's handy to override it with styles, or just pass hex-specific styles.
However, isn't style
prop supposed to be an object? Now the prop type is set to be a string.
Also, if could update the snapshot (or even add this in to a test). Once the test passes I'll be happy to merge this in.
No lie, I went back and added those changes, pushed, and just now saw your comment. I went with the string just because it seems preferred by the SVG docs I scanned in MDB, but I personally used an object and felt like a hypocrite.
Fwiw, my implementation needed programmatically derived fills, so it could be more of an edge use.
I added a style prop to the Hexagon component for my own project and thought it might be useful to others. It explicitly anticipates a string in the 'fill:red;stroke:1;etc' style, but will render any old style object as well. Btw, I love this library. Thanks for sharing it.