@@ -8,7 +8,7 @@ import ButtonBase from '@material-ui/core/ButtonBase';
8
8
import { fade } from '@material-ui/core/styles/colorManipulator' ;
9
9
import clamp from '../utils/clamp' ;
10
10
11
- export const style = theme => {
11
+ export const styles = theme => {
12
12
const commonTransitionsOptions = {
13
13
duration : theme . transitions . duration . short ,
14
14
easing : theme . transitions . easing . easeOut ,
@@ -29,7 +29,7 @@ export const style = theme => {
29
29
} ;
30
30
31
31
return {
32
- // / * Styles for root node */
32
+ /* Styles applied to the root element. */
33
33
root : {
34
34
position : 'relative' ,
35
35
width : '100%' ,
@@ -50,13 +50,14 @@ export const style = theme => {
50
50
transform : 'scaleY(-1)' ,
51
51
} ,
52
52
} ,
53
+ /* Styles applied to the container element. */
53
54
container : {
54
55
position : 'relative' ,
55
56
'&$vertical' : {
56
57
height : '100%' ,
57
58
} ,
58
59
} ,
59
- /* Tracks styles */
60
+ /* Styles applied to the track elements. */
60
61
track : {
61
62
position : 'absolute' ,
62
63
transform : 'translate(0, -50%)' ,
@@ -79,6 +80,7 @@ export const style = theme => {
79
80
backgroundColor : colors . focused ,
80
81
} ,
81
82
} ,
83
+ /* Styles applied to the track element before the thumb. */
82
84
trackBefore : {
83
85
zIndex : 1 ,
84
86
left : 0 ,
@@ -88,6 +90,7 @@ export const style = theme => {
88
90
backgroundColor : colors . primary ,
89
91
} ,
90
92
} ,
93
+ /* Styles applied to the track element after the thumb. */
91
94
trackAfter : {
92
95
right : 0 ,
93
96
backgroundColor : colors . secondary ,
@@ -96,7 +99,7 @@ export const style = theme => {
96
99
bottom : 0 ,
97
100
} ,
98
101
} ,
99
- /* Thumb styles */
102
+ /* Styles applied to the thumb element. */
100
103
thumb : {
101
104
position : 'absolute' ,
102
105
zIndex : 2 ,
@@ -137,13 +140,20 @@ export const style = theme => {
137
140
height : 17 ,
138
141
} ,
139
142
} ,
143
+ /* Class applied to the root element to trigger JSS nested styles if `reverse={true}` . */
144
+ reverse : { } ,
145
+ /* Class applied to the track and thumb elements to trigger JSS nested styles if `disabled`. */
146
+ disabled : { } ,
147
+ /* Class applied to the track and thumb elements to trigger JSS nested styles if `jumped`. */
148
+ jumped : { } ,
149
+ /* Class applied to the track and thumb elements to trigger JSS nested styles if `focused`. */
140
150
focused : { } ,
151
+ /* Class applied to the track and thumb elements to trigger JSS nested styles if `activated`. */
141
152
activated : { } ,
142
- disabled : { } ,
143
- zero : { } ,
153
+ /* Class applied to the root, track and container to trigger JSS nested styles if `vertical`. */
144
154
vertical : { } ,
145
- reverse : { } ,
146
- jumped : { } ,
155
+ /* Class applied to the thumb to trigger nested styles if `value` = `min` . */
156
+ zero : { } ,
147
157
} ;
148
158
} ;
149
159
@@ -417,7 +427,7 @@ class Slider extends React.Component {
417
427
[ classes . activated ] : ! disabled && currentState === 'activated' ,
418
428
} ;
419
429
420
- const rootClasses = classNames (
430
+ const className = classNames (
421
431
classes . root ,
422
432
{
423
433
[ classes . vertical ] : vertical ,
@@ -452,7 +462,7 @@ class Slider extends React.Component {
452
462
return (
453
463
< Component
454
464
role = "slider"
455
- className = { rootClasses }
465
+ className = { className }
456
466
aria-valuenow = { value }
457
467
aria-valuemin = { min }
458
468
aria-valuemax = { max }
@@ -555,4 +565,4 @@ Slider.defaultProps = {
555
565
component : 'div' ,
556
566
} ;
557
567
558
- export default withStyles ( style , { name : 'MuiSlider' , withTheme : true } ) ( Slider ) ;
568
+ export default withStyles ( styles , { name : 'MuiSlider' , withTheme : true } ) ( Slider ) ;
0 commit comments