Open sjarva opened 4 years ago
Hi, sorry for not responding earlier.
When dragging the handle of the switch, the color flickers when the handle goes to either end of the switch (Chrome 87, Ubuntu). Regardless of whether that can be fixed, I'm not sure I will accept this PR. Expanding the API with four new props for a small feature is probably not worth it. I'm open to changing my mind about it.
Currently, you can do hover styles with CSS although it's a bit hacky and I don't you can vary it depending on checked state.
.react-switch:hover .react-switch-bg {
background: red;
}
Add custom onHoverColor, offHoverColor, onHoverHandleColor and offHoverHandleColor as optional props. Fixes #61