give default background size to slider
This commit is contained in:
parent
2d09b8f858
commit
e168add75c
|
@ -22,6 +22,7 @@ const LeverageSlider = ({
|
||||||
const val = parseFloat(target.value)
|
const val = parseFloat(target.value)
|
||||||
|
|
||||||
target.style.backgroundSize = ((val - min) * 100) / (max - min) + '% 100%'
|
target.style.backgroundSize = ((val - min) * 100) / (max - min) + '% 100%'
|
||||||
|
|
||||||
onChange(e.target.value)
|
onChange(e.target.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,6 +37,7 @@ const LeverageSlider = ({
|
||||||
step={0.000001}
|
step={0.000001}
|
||||||
className="w-full"
|
className="w-full"
|
||||||
onChange={handleSliderChange}
|
onChange={handleSliderChange}
|
||||||
|
style={{ backgroundSize: '50% 100%' }}
|
||||||
></input>
|
></input>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue