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
width: 400px
.range-slider
position: relative position: relative
.scale .scale
...@@ -8,11 +11,17 @@ ...@@ -8,11 +11,17 @@
.knob .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
.button .button
margin-top: -3px margin-top: -3px
background: #f00 //background: #f00
width: 10px background: #eee
height: 10px width: 30px
border-radius: 50% 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