markusenglund / react-switch

A draggable toggle-switch component for React. Check out the demo at:
https://react-switch.netlify.com/
MIT License
1.33k stars 101 forks source link

Add handle icons #73

Closed morinted closed 3 years ago

morinted commented 4 years ago

Fix #55, Fix #57

I saw that there were already a couple issues open for this, so decided that I would share upstream in case you were interested in this feature.

Adds two props, uncheckedHandleIcon and checkedHandleIcon. When provided, the handle will render with an icon on it.

handle icons demo

Things I've done in this PR:

Hope this is helpful!

princesinha19 commented 4 years ago

@morinted Good PR. @markusenglund Please merge it.

VirtualParticle commented 4 years ago

This is great, this would be really useful for something like a night mode toggle.

quolpr commented 3 years ago

@markusenglund what do you think?

markusenglund commented 3 years ago

Hi, I'm sorry for the late response.

The PR is excellent, no problems found. The feature seems to be of interest to a lot people so it will be a good addition to the package. It will be included in the next release which should be out before new year.