gre / multi-slider

React component for multiple values slider (allocate values)
http://gre.github.io/multi-slider
49 stars 31 forks source link

add renderTrackLabel prop to render a label below/inside/above the track #8

Open gre opened 7 years ago

gre commented 7 years ago

I imagine the rendering could be above/below or even inside the track itself (the number inside the rectangle). so many possibilities but basically user could do: renderTrackLabel={({ value, editing, ... }) => editing ? <text y={10}>{value}</text> : null} (x would be set by a parent <g> but as you would be probably centered, you would have to offset y by a given amount)