react-switch icon indicating copy to clipboard operation
react-switch copied to clipboard

Add custom hover colors to background and handle. Fixes #61

Open sjarva opened this issue 5 years ago • 1 comments

Add custom onHoverColor, offHoverColor, onHoverHandleColor and offHoverHandleColor as optional props. Fixes #61

sjarva avatar Jan 16 '20 18:01 sjarva

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). react-switch-flicker 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;
}

markusenglund avatar Dec 12 '20 16:12 markusenglund