gabidavila / react-usa-map

React component with all USA States with customizable options. No D3 needed.

Home Page:http://react-usa-map-demo.herokuapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add state-specific classes to customize

sreynen opened this issue · comments

Currently the className for USAState paths is fixed as ${props.state} state and I would like to be able to pass in additional classes for each state. I imagine this would look something like: <USAMap customize={{ "CO": { class: "active" }, "NJ": { class: "active" }} />. My specific use case is being able to adjust stroke on states, but adjustable classes seems like a good way to make all style adjustable.

That's also something that I've done, and also, if @gabidavila agrees that would be a good addition to the project, I might add a PR with that. 👍