@@ -5,61 +5,63 @@ import withStyles from '../styles/withStyles';
55import useTheme from '../styles/useTheme' ;
66import capitalize from '../utils/capitalize' ;
77
8- export const styles = theme => ( {
9- /* Styles applied to the root element. */
10- root : {
11- position : 'absolute' ,
12- bottom : 0 ,
13- right : 0 ,
14- top : - 5 ,
15- left : 0 ,
16- margin : 0 ,
17- padding : 0 ,
18- paddingLeft : 8 ,
19- pointerEvents : 'none' ,
20- borderRadius : 'inherit' ,
21- borderStyle : 'solid' ,
22- borderWidth : 1 ,
23- } ,
24- /* Styles applied to the legend element when `labelWidth` is provided. */
25- legend : {
26- textAlign : 'left' ,
27- padding : 0 ,
28- lineHeight : '11px' , // sync with `height` in `legend` styles
29- transition : theme . transitions . create ( 'width' , {
30- duration : 150 ,
31- easing : theme . transitions . easing . easeOut ,
32- } ) ,
33- } ,
34- /* Styles applied to the legend element. */
35- legendLabelled : {
36- display : 'block' ,
37- width : 'auto' ,
38- textAlign : 'left' ,
39- padding : 0 ,
40- height : 11 , // sync with `lineHeight` in `legend` styles
41- fontSize : '0.75em' ,
42- visibility : 'hidden' ,
43- maxWidth : 0.01 ,
44- transition : theme . transitions . create ( 'max-width' , {
45- duration : 50 ,
46- easing : theme . transitions . easing . easeOut ,
47- } ) ,
48- '& span' : {
49- paddingLeft : 5 ,
50- paddingRight : 5 ,
8+ export const styles = theme => {
9+ return {
10+ /* Styles applied to the root element. */
11+ root : {
12+ position : 'absolute' ,
13+ bottom : 0 ,
14+ right : 0 ,
15+ top : - 5 ,
16+ left : 0 ,
17+ margin : 0 ,
18+ padding : 0 ,
19+ paddingLeft : 8 ,
20+ pointerEvents : 'none' ,
21+ borderRadius : 'inherit' ,
22+ borderStyle : 'solid' ,
23+ borderWidth : 1 ,
5124 } ,
52- } ,
53- /* Styles applied to the legend element is notched. */
54- legendNotched : {
55- maxWidth : 1000 ,
56- transition : theme . transitions . create ( 'max-width' , {
57- duration : 100 ,
58- easing : theme . transitions . easing . easeOut ,
59- delay : 50 ,
60- } ) ,
61- } ,
62- } ) ;
25+ /* Styles applied to the legend element when `labelWidth` is provided. */
26+ legend : {
27+ textAlign : 'left' ,
28+ padding : 0 ,
29+ lineHeight : '11px' , // sync with `height` in `legend` styles
30+ transition : theme . transitions . create ( 'width' , {
31+ duration : 150 ,
32+ easing : theme . transitions . easing . easeOut ,
33+ } ) ,
34+ } ,
35+ /* Styles applied to the legend element. */
36+ legendLabelled : {
37+ display : 'block' ,
38+ width : 'auto' ,
39+ textAlign : 'left' ,
40+ padding : 0 ,
41+ height : 11 , // sync with `lineHeight` in `legend` styles
42+ fontSize : '0.75em' ,
43+ visibility : 'hidden' ,
44+ maxWidth : 0.01 ,
45+ transition : theme . transitions . create ( 'max-width' , {
46+ duration : 50 ,
47+ easing : theme . transitions . easing . easeOut ,
48+ } ) ,
49+ '& span' : {
50+ paddingLeft : 5 ,
51+ paddingRight : 5 ,
52+ } ,
53+ } ,
54+ /* Styles applied to the legend element is notched. */
55+ legendNotched : {
56+ maxWidth : 1000 ,
57+ transition : theme . transitions . create ( 'max-width' , {
58+ duration : 100 ,
59+ easing : theme . transitions . easing . easeOut ,
60+ delay : 50 ,
61+ } ) ,
62+ } ,
63+ } ;
64+ } ;
6365
6466/**
6567 * @ignore - internal component.
0 commit comments