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 100 forks source link

Add option to customize border-radius #48

Closed lbraun closed 3 years ago

lbraun commented 5 years ago

Thank you for this package. Would it be possible to add a prop to customize the border radius, to allow for squarer switches, e.g. like this?:

image image

Alternatively a more direct way to style the handle and background would be nice, i.e. what was proposed in #15 .

markusenglund commented 5 years ago

This seems like a cool thing to support.

As you say, we can either create a new borderRadius prop, or create a couple of style props for the different html-tags. I played around a little bit to get a feel for the first option and made a PR for it here: #50 which probably won't get merged. The latter option is probably better long term because it adds more flexibility. I'll take a look at that soon.

lbraun commented 5 years ago

Awesome, thanks!

markusenglund commented 3 years ago

I ended up implementing the borderRadius property PR.