Commit 4b83e30d authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[Graph] some range slider styling

parent 7eb07ced
.range-slider {
.range {
width: 400px;
}
.range .range-slider {
position: relative;
}
.range-slider .scale {
.range .range-slider .scale {
position: absolute;
background-color: #555;
}
.range-slider .knob {
.range .range-slider .knob {
position: absolute;
cursor: pointer;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
-o-user-select: none;
}
.range-slider .knob .button {
.range .range-slider .knob .button {
margin-top: -3px;
background: #f00;
width: 10px;
height: 10px;
border-radius: 50%;
background: #eee;
width: 30px;
height: 20px;
}
/*# sourceMappingURL=range-slider.css.map */
.range-slider
position: relative
.range
width: 400px
.scale
position: absolute
background-color: #555
.range-slider
position: relative
.knob
position: absolute
cursor: pointer
.scale
position: absolute
background-color: #555
.button
margin-top: -3px
.knob
position: absolute
cursor: pointer
-moz-user-select: none
-webkit-user-select: none
-ms-user-select: none
user-select: none
-o-user-select: none
background: #f00
width: 10px
height: 10px
border-radius: 50%
.button
margin-top: -3px
//background: #f00
background: #eee
width: 30px
height: 20px
//border-radius: 50%
......@@ -29,7 +29,7 @@ rangeControlCpt = R.hooksComponent "RangeButton" cpt
where
cpt {caption, sliderProps} _ = do
pure $
H.span {}
H.span {className: "range"}
[ H.label {} [ H.text caption ]
, RS.rangeSlider sliderProps
]
......
......@@ -154,8 +154,10 @@ renderScale ref {width,height} (Range.Closed {min, max}) =
renderKnob :: Knob -> R.Ref (Nullable DOM.Element) -> Range.NumberRange -> Bounds -> R2.StateSetter (Maybe Knob) -> Int -> R.Element
renderKnob knob ref (Range.Closed value) bounds set precision =
H.div { ref, tabIndex, className, aria, onMouseDown, style } [
H.div { className: "button" } []
, H.text $ text $ toFixed precision val
H.div { className: "button" }
[
H.text $ text $ toFixed precision val
]
]
where
text (Just num) = num
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment