@@ -59,11 +59,13 @@ const Sidebar = props => {
59
59
>
60
60
< Skeleton
61
61
width = { 100 }
62
- color = { colors . grey [ 'A700' ] }
63
- highlightColor = { colors . grey [ 'A400' ] }
62
+ color = { nightMode && colors . grey [ 'A700' ] }
63
+ highlightColor = { nightMode && colors . grey [ 'A400' ] }
64
64
/>
65
65
</ div >
66
66
67
+ < Divider className = { classes . topDivider } />
68
+
67
69
< div
68
70
className = { classNames (
69
71
classes . link ,
@@ -77,16 +79,16 @@ const Sidebar = props => {
77
79
circle
78
80
width = { 25 }
79
81
height = { 25 }
80
- color = { colors . grey [ '900 ' ] }
81
- highlightColor = { colors . grey [ '700 ' ] }
82
+ color = { nightMode && colors . grey [ 'A700 ' ] }
83
+ highlightColor = { nightMode && colors . grey [ 'A400 ' ] }
82
84
/>
83
85
</ span >
84
86
85
87
< span className = { classes . linkTextLoading } >
86
88
< Skeleton
87
89
width = { 100 }
88
- color = { colors . grey [ '900 ' ] }
89
- highlightColor = { colors . grey [ '700 ' ] }
90
+ color = { nightMode && colors . grey [ 'A700 ' ] }
91
+ highlightColor = { nightMode && colors . grey [ 'A400 ' ] }
90
92
/>
91
93
</ span >
92
94
</ div >
@@ -101,8 +103,8 @@ const Sidebar = props => {
101
103
>
102
104
< Skeleton
103
105
width = { 100 }
104
- color = { colors . grey [ 'A700' ] }
105
- highlightColor = { colors . grey [ 'A400' ] }
106
+ color = { nightMode && colors . grey [ 'A700' ] }
107
+ highlightColor = { nightMode && colors . grey [ 'A400' ] }
106
108
/>
107
109
</ div >
108
110
@@ -120,16 +122,20 @@ const Sidebar = props => {
120
122
circle
121
123
width = { 25 }
122
124
height = { 25 }
123
- color = { colors . grey [ '900' ] }
124
- highlightColor = { colors . grey [ '700' ] }
125
+ color = { nightMode && colors . grey [ 'A700' ] }
126
+ highlightColor = {
127
+ nightMode && colors . grey [ 'A400' ]
128
+ }
125
129
/>
126
130
</ span >
127
131
128
132
< span className = { classes . linkTextLoading } >
129
133
< Skeleton
130
134
width = { 100 }
131
- color = { colors . grey [ '900' ] }
132
- highlightColor = { colors . grey [ '700' ] }
135
+ color = { nightMode && colors . grey [ 'A700' ] }
136
+ highlightColor = {
137
+ nightMode && colors . grey [ 'A400' ]
138
+ }
133
139
/>
134
140
</ span >
135
141
</ div >
@@ -157,22 +163,24 @@ const Sidebar = props => {
157
163
/>
158
164
</ ListItem >
159
165
166
+ < Divider className = { classes . topDivider } />
167
+
160
168
< ListItem
161
169
button
162
170
dense
163
171
className = { classNames (
164
172
classes . link ,
165
173
classes . linkGroup ,
166
174
classes . linkActionable ,
167
- locationPathname === homeLink . path && classes . itemActive ,
175
+ locationPathname === homeLink . path && classes . linkActive ,
168
176
) }
169
177
onClick = { ( ) => navigate ( homeLink . path ) }
170
178
>
171
179
< ListItemIcon > { homeLink . icon } </ ListItemIcon >
172
180
173
181
< ListItemText
174
182
classes = { {
175
- primary : classes . linkPrimary ,
183
+ primary : classes . linkText ,
176
184
} }
177
185
>
178
186
{ homeLink . name }
@@ -199,15 +207,15 @@ const Sidebar = props => {
199
207
className = { classNames (
200
208
classes . link ,
201
209
classes . linkActionable ,
202
- locationPathname === path && classes . itemActive ,
210
+ locationPathname === path && classes . linkActive ,
203
211
) }
204
212
onClick = { ( ) => navigate ( path ) }
205
213
>
206
214
< ListItemIcon > { icon } </ ListItemIcon >
207
215
208
216
< ListItemText
209
217
classes = { {
210
- primary : classes . linkPrimary ,
218
+ primary : classes . linkText ,
211
219
textDense : classes . textDense ,
212
220
} }
213
221
>
@@ -236,78 +244,99 @@ Sidebar.propTypes = {
236
244
} ;
237
245
238
246
const styles = theme => ( {
247
+ brand : {
248
+ fontSize : 24 ,
249
+ fontFamily : theme . typography . fontFamily ,
250
+ color : theme . palette . common . white ,
251
+ } ,
252
+
253
+ brandLogo : {
254
+ width : 230 ,
255
+ } ,
256
+
239
257
linkGroupHeader : {
240
258
paddingTop : 16 ,
241
259
paddingBottom : 16 ,
242
260
} ,
243
261
244
262
linkGroupHeaderPrimary : {
245
- color : theme . palette . common . white ,
263
+ color :
264
+ theme . palette . type === 'dark'
265
+ ? theme . palette . text . primary
266
+ : theme . palette . text . secondary ,
246
267
} ,
247
268
248
269
link : {
249
270
paddingTop : 4 ,
250
271
paddingBottom : 4 ,
251
- color : 'rgba(255, 255, 255, 0.7)' ,
272
+ color : theme . palette . text . secondary ,
252
273
} ,
253
274
254
275
linkGroup : {
255
- backgroundColor : '#232f3e' ,
256
- boxShadow : '0 -1px 0 #404854 inset' ,
276
+ backgroundColor :
277
+ theme . palette . type === 'dark'
278
+ ? theme . palette . grey [ 800 ]
279
+ : theme . palette . common . white ,
257
280
paddingTop : 16 ,
258
281
paddingBottom : 16 ,
259
282
} ,
260
283
261
- brandLoading : {
262
- padding : '1rem 0.75rem' ,
284
+ linkText : {
285
+ color : 'inherit' ,
286
+ fontSize : theme . typography . fontSize ,
287
+ '&$textDense' : {
288
+ fontSize : theme . typography . fontSize ,
289
+ } ,
263
290
} ,
264
291
265
- brandLogo : {
266
- width : 230 ,
292
+ linkActionable : {
293
+ '&:hover' : {
294
+ color :
295
+ theme . palette . type === 'dark'
296
+ ? theme . palette . text . primary
297
+ : theme . palette . text . secondary ,
298
+ } ,
267
299
} ,
268
300
269
- linkLoading : {
270
- padding : '0.75rem' ,
271
- display : 'flex' ,
272
- flexDirection : 'row' ,
301
+ linkActive : {
302
+ color : theme . palette . common . white ,
303
+ backgroundColor : theme . palette . primary . main ,
273
304
} ,
274
305
275
- linkIconLoading : {
276
- marginRight : theme . spacing . unit * 2 ,
277
- } ,
306
+ textDense : { } ,
278
307
279
- linkTextLoading : {
280
- marginTop : theme . spacing . unit / 2 ,
308
+ divider : {
309
+ marginTop : theme . spacing . unit * 2 ,
310
+ backgroundColor :
311
+ theme . palette . type === 'dark'
312
+ ? theme . palette . grey [ '700' ]
313
+ : theme . palette . grey [ '200' ] ,
281
314
} ,
282
315
283
- brand : {
284
- fontSize : 24 ,
285
- fontFamily : theme . typography . fontFamily ,
286
- color : theme . palette . common . white ,
316
+ topDivider : {
317
+ marginBottom : theme . spacing . unit * 2 ,
318
+ backgroundColor :
319
+ theme . palette . type === 'dark'
320
+ ? theme . palette . grey [ '700' ]
321
+ : theme . palette . grey [ '200' ] ,
287
322
} ,
288
323
289
- linkActionable : {
290
- '&:hover' : {
291
- backgroundColor : 'rgba(255, 255, 255, 0.08)' ,
292
- } ,
324
+ brandLoading : {
325
+ padding : '1rem 0.75rem' ,
293
326
} ,
294
327
295
- itemActive : {
296
- color : '#4fc3f7' ,
328
+ linkLoading : {
329
+ padding : '0.75rem' ,
330
+ display : 'flex' ,
331
+ flexDirection : 'row' ,
297
332
} ,
298
333
299
- linkPrimary : {
300
- color : 'inherit' ,
301
- fontSize : theme . typography . fontSize ,
302
- '&$textDense' : {
303
- fontSize : theme . typography . fontSize ,
304
- } ,
334
+ linkIconLoading : {
335
+ marginRight : theme . spacing . unit * 2 ,
305
336
} ,
306
337
307
- textDense : { } ,
308
-
309
- divider : {
310
- marginTop : theme . spacing . unit * 2 ,
338
+ linkTextLoading : {
339
+ marginTop : theme . spacing . unit / 2 ,
311
340
} ,
312
341
} ) ;
313
342
0 commit comments