This repository was archived by the owner on May 14, 2020. It is now read-only.
File tree 2 files changed +21
-11
lines changed
2 files changed +21
-11
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ const styles = {
5
5
display : 'inline-block' ,
6
6
marginLeft : 0 ,
7
7
marginTop : 8 ,
8
- marginRight : 5 ,
9
8
'float' : 'left' ,
10
9
transition : '150ms' ,
11
10
WebkitTransition : '150ms' ,
@@ -15,8 +14,13 @@ const styles = {
15
14
transform : 'rotateZ(-90deg)' ,
16
15
position : 'relative'
17
16
} ,
18
- baseDouble : {
19
- marginRight : 10
17
+ container : {
18
+ display : 'inline-block' ,
19
+ padding : '2 5' ,
20
+ cursor : 'pointer'
21
+ } ,
22
+ containerDouble : {
23
+ padding : '2 10'
20
24
} ,
21
25
arrow : {
22
26
borderLeft : '5px solid transparent' ,
@@ -38,6 +42,9 @@ const styles = {
38
42
39
43
export default class JSONArrow extends React . Component {
40
44
render ( ) {
45
+ let containerStyle = {
46
+ ...styles . container
47
+ } ;
41
48
let style = {
42
49
...styles . base ,
43
50
...styles . arrow
@@ -52,20 +59,22 @@ export default class JSONArrow extends React.Component {
52
59
} ;
53
60
}
54
61
if ( this . props . double ) {
55
- style = {
56
- ...style ,
57
- ...styles . baseDouble
62
+ containerStyle = {
63
+ ...containerStyle ,
64
+ ...styles . containerDouble
58
65
} ;
59
66
}
60
67
style = {
61
68
...style ,
62
69
...this . props . style
63
70
} ;
64
71
return (
65
- < div style = { { ...color , ...style } } onClick = { this . props . onClick } >
66
- { this . props . double &&
67
- < div style = { { ...color , ...styles . inner , ...styles . arrow } } />
68
- }
72
+ < div style = { containerStyle } onClick = { this . props . onClick } >
73
+ < div style = { { ...color , ...style } } >
74
+ { this . props . double &&
75
+ < div style = { { ...color , ...styles . inner , ...styles . arrow } } />
76
+ }
77
+ </ div >
69
78
</ div >
70
79
) ;
71
80
}
Original file line number Diff line number Diff line change @@ -73,7 +73,8 @@ const STYLES = {
73
73
label : {
74
74
margin : 0 ,
75
75
padding : 0 ,
76
- display : 'inline-block'
76
+ display : 'inline-block' ,
77
+ cursor : 'pointer'
77
78
} ,
78
79
span : {
79
80
cursor : 'default'
You can’t perform that action at this time.
0 commit comments