Closed Gunner17 closed 2 years ago
Hey! this is a great suggestion and it will be part of 1.0.0
.
Please see commits:
https://github.com/kadoshms/react-jvectormap/commit/23a3135a1e65ded1c187d27471cbc1ce4715d078
Long story short, version 1.0.0
will allow passing regionStyle
as a function:
regionStyle: (code) => ({
initial: {
fill: initial[code],
},
hover: {
fill: hover[code],
},
})
I want to add a fill color on hover of only those countries, which are being filled with yellow on the map (since those are the only countries whose data have been passed to the map). But if I add fill inside hover, like below:
the fill color applies to all the regions on hover and not specifically to the yellow ones. How can I achieve applying selective hover color in this setup?
TLDR: Hover color should show only on the yellow-ish regions, not on the grey ones.