multi-range-slider-react
Advanced tools
Comparing version
{ | ||
"name": "multi-range-slider-react", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "react component that return two value minValue and maxValue by event onInput/onChange.", | ||
@@ -5,0 +5,0 @@ "main": "./lib/MultiRangeSlider.js", |
@@ -31,2 +31,4 @@ # multi-range-slider-react | ||
| preventWheel | Boolean | false | true then it not accept mouse wheel to change its value. false then (shift + wheel) change minValue (ctrl+wheel) change maxValue, (ctrl+shift+wheel) change both values | | ||
|ruler|Boolean|true|is ruler visible or not| | ||
|label|Boolean|true|is label visible or not| | ||
@@ -52,6 +54,2 @@ ## How to Install | ||
const [maxValue, set_maxValue] = useState(75); | ||
const min = 0; | ||
const max = 100; | ||
const step = 5; | ||
const preventWheel = false; | ||
const handleInput = (e) => { | ||
@@ -65,8 +63,10 @@ set_minValue(e.minValue); | ||
<MultiRangeSlider | ||
min={min} | ||
max={max} | ||
min={0} | ||
max={100} | ||
step={5} | ||
ruler={true} | ||
label={true} | ||
preventWheel={false} | ||
minValue={minValue} | ||
maxValue={maxValue} | ||
step={step} | ||
preventWheel={preventWheel} | ||
onInput={(e) => { | ||
@@ -73,0 +73,0 @@ handleInput(e); |
35253
0.15%