ConsenSysMesh / rimble-ui

React components that implement Rimble's Design System.
https://rimble.consensys.design/
MIT License
462 stars 67 forks source link

Ability to pass in event handlers to Slider component #452

Open orbmis opened 4 years ago

orbmis commented 4 years ago

Is your feature request related to a problem? Please describe. The slider component doesn't seem to provide a way to respond to it's movements.

Describe the solution you'd like It would be great to be able to pass in a callback function as a prop to the slider that accepts as a parameter the percentage that the slider has moved fro left to right. This callback would be executed every time the slider moved.

Describe alternatives you've considered This could be done perhaps using refs and DOM event handlers, but it would be a hack.

Additional context https://rimble.consensys.design/components/rimble-ui/Slider