aaronshaf / react-toggle

Elegant, accessible toggle component for React. Also a glorified checkbox.
http://aaronshaf.github.io/react-toggle/
MIT License
945 stars 159 forks source link

Styling has to be sent as props. #115

Open amalantony opened 6 years ago

amalantony commented 6 years ago

Since the toggle button styles are read from a global css file, it's impossible to style toggle buttons differently in different parts of an application. To fix this, custom styles will have to be accepted as props to the Toggle component. The react-component/slider library uses this approach of styling: https://github.com/react-component/slider#common-api.

jkerrwilson commented 6 years ago

Seconded.