Skip to content

Commit fe9a404

Browse files
authored
style(compass-shell): Make toggle flash on connect (#2917)
1 parent e324378 commit fe9a404

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

packages/compass-shell/src/components/shell-header/shell-header.jsx

+21-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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';
22
import PropTypes from 'prop-types';
33
import React, { Component } from 'react';
44

@@ -16,11 +16,28 @@ const shellHeaderLeftStyles = css({
1616
alignItems: 'center'
1717
});
1818

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+
1936
const shellHeaderToggleStyles = css({
2037
background: 'none',
2138
border: 'none',
2239
cursor: 'pointer',
23-
color: uiColors.gray.light1,
40+
color: shellHeaderDefaultColor,
2441
padding: `0px ${spacing[2]}px`,
2542
height: '100%',
2643
display: 'flex',
@@ -34,11 +51,13 @@ const shellHeaderToggleStyles = css({
3451
transition: 'all 200ms',
3552
userSelect: 'none',
3653
textTransform: 'uppercase',
54+
animation: `${shellLoaderFlash} 2s linear`,
3755
'&:hover': {
3856
color: uiColors.gray.light3
3957
}
4058
});
4159

60+
4261
const shellHeaderRightStyles = css({
4362
display: 'flex',
4463
paddingTop: spacing[1] / 2,

0 commit comments

Comments
 (0)