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

Feature: add `disabledOpacity` prop #65

Open zhaoyao91 opened 4 years ago

zhaoyao91 commented 4 years ago

Currently the opacity is injected as inline style and set to 0.5 when the component is disabled.

I want to lower the value to 0.4, but if I set it via css, I have to put the !important flag which reduce the customization ability of the user of my lib.

So is it ok to add such a property? or just allow us to set a style object wich could override the default one?