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; position: relative;
} }
.range-slider .scale { .range .range-slider .scale {
position: absolute; position: absolute;
background-color: #555; background-color: #555;
} }
.range-slider .knob { .range .range-slider .knob {
position: absolute; position: absolute;
cursor: pointer; 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; margin-top: -3px;
background: #f00; background: #eee;
width: 10px; width: 30px;
height: 10px; height: 20px;
border-radius: 50%;
} }
/*# sourceMappingURL=range-slider.css.map */ /*# sourceMappingURL=range-slider.css.map */
.range-slider .range
position: relative width: 400px
.scale .range-slider
position: absolute position: relative
background-color: #555
.knob .scale
position: absolute position: absolute
cursor: pointer background-color: #555
.button .knob
margin-top: -3px 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 .button
width: 10px margin-top: -3px
height: 10px
border-radius: 50% //background: #f00
background: #eee
width: 30px
height: 20px
//border-radius: 50%
...@@ -29,7 +29,7 @@ rangeControlCpt = R.hooksComponent "RangeButton" cpt ...@@ -29,7 +29,7 @@ rangeControlCpt = R.hooksComponent "RangeButton" cpt
where where
cpt {caption, sliderProps} _ = do cpt {caption, sliderProps} _ = do
pure $ pure $
H.span {} H.span {className: "range"}
[ H.label {} [ H.text caption ] [ H.label {} [ H.text caption ]
, RS.rangeSlider sliderProps , RS.rangeSlider sliderProps
] ]
......
...@@ -154,8 +154,10 @@ renderScale ref {width,height} (Range.Closed {min, max}) = ...@@ -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 -> R.Ref (Nullable DOM.Element) -> Range.NumberRange -> Bounds -> R2.StateSetter (Maybe Knob) -> Int -> R.Element
renderKnob knob ref (Range.Closed value) bounds set precision = renderKnob knob ref (Range.Closed value) bounds set precision =
H.div { ref, tabIndex, className, aria, onMouseDown, style } [ H.div { ref, tabIndex, className, aria, onMouseDown, style } [
H.div { className: "button" } [] H.div { className: "button" }
, H.text $ text $ toFixed precision val [
H.text $ text $ toFixed precision val
]
] ]
where where
text (Just num) = num 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