1
- import { Icon , IconButton , css , spacing , uiColors } from '@mongodb-js/compass-components' ;
1
+ import { Icon , IconButton , css , spacing , uiColors , keyframes } from '@mongodb-js/compass-components' ;
2
2
import PropTypes from 'prop-types' ;
3
3
import React , { Component } from 'react' ;
4
4
@@ -16,11 +16,28 @@ const shellHeaderLeftStyles = css({
16
16
alignItems : 'center'
17
17
} ) ;
18
18
19
+
20
+ const shellHeaderDefaultColor = uiColors . gray . light1 ;
21
+ const shellHeaderFlashColorDark = uiColors . gray . light1 ;
22
+ const shellHeaderFlashColorLight = uiColors . gray . light1 ;
23
+ const shellLoaderFlash = keyframes `
24
+ 0% { color: ${ uiColors . gray . light1 } ; }
25
+ 10% { color: ${ shellHeaderFlashColorDark } ; }
26
+ 20% { color: ${ shellHeaderFlashColorLight } ; }
27
+ 30% { color: ${ shellHeaderFlashColorDark } ; }
28
+ 40% { color: ${ shellHeaderFlashColorLight } ; }
29
+ 50% { color: ${ shellHeaderFlashColorDark } ; }
30
+ 60% { color: ${ shellHeaderFlashColorLight } ; }
31
+ 70% { color: ${ shellHeaderFlashColorDark } ; }
32
+ 80% { color: ${ shellHeaderFlashColorLight } ; }
33
+ 100% { color: ${ uiColors . gray . light1 } ; }
34
+ ` ;
35
+
19
36
const shellHeaderToggleStyles = css ( {
20
37
background : 'none' ,
21
38
border : 'none' ,
22
39
cursor : 'pointer' ,
23
- color : uiColors . gray . light1 ,
40
+ color : shellHeaderDefaultColor ,
24
41
padding : `0px ${ spacing [ 2 ] } px` ,
25
42
height : '100%' ,
26
43
display : 'flex' ,
@@ -34,11 +51,13 @@ const shellHeaderToggleStyles = css({
34
51
transition : 'all 200ms' ,
35
52
userSelect : 'none' ,
36
53
textTransform : 'uppercase' ,
54
+ animation : `${ shellLoaderFlash } 2s linear` ,
37
55
'&:hover' : {
38
56
color : uiColors . gray . light3
39
57
}
40
58
} ) ;
41
59
60
+
42
61
const shellHeaderRightStyles = css ( {
43
62
display : 'flex' ,
44
63
paddingTop : spacing [ 1 ] / 2 ,
0 commit comments