-
-
Notifications
You must be signed in to change notification settings - Fork 96
/
Copy pathDropdown.css.ts
64 lines (57 loc) · 1.68 KB
/
Dropdown.css.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import {style} from '@vanilla-extract/css';
import * as buttonStyles from '../Button/Button.css';
import {themeVars} from '../../theme';
export const dropdownPanel = style({
overflow: 'hidden',
borderRadius: themeVars.borderRadius.lg,
backgroundColor: themeVars.dynamicColors.listBox.panelBackground,
display: 'flex',
flexDirection: 'column',
width: '260px',
boxShadow: themeVars.boxShadow.md,
});
export const dropdownMenuPanel = style({
boxShadow: themeVars.boxShadow.md,
backgroundColor: themeVars.dynamicColors.listBox.panelBackground,
display: 'flex',
flexDirection: 'row',
overflow: 'hidden',
borderRadius: themeVars.borderRadius.md,
zIndex: themeVars.zIndex['40'],
});
export const dropdownMenu = style({
padding: themeVars.spacing['2'],
display: 'flex',
flexDirection: 'column',
rowGap: themeVars.spacing['1'],
});
export const dropdownMenuButton = style([
buttonStyles.button,
{
textAlign: 'left',
border: 0,
margin: 0,
display: 'block',
width: '100%',
padding: `${themeVars.spacing['2']}`,
borderRadius: themeVars.borderRadius.md,
background: 'transparent',
color: themeVars.dynamicColors.listBox.textColor,
':focus': {
boxShadow: 'none',
outline: 'none',
},
':hover': {
backgroundColor: themeVars.dynamicColors.listBox.hoverBackgroundColor,
},
selectors: {
'&[aria-selected=true]': {
backgroundColor: themeVars.dynamicColors.listBox.activeBackgroundColor,
color: themeVars.dynamicColors.listBox.activeTextColor,
},
'&[aria-selected=true]:hover': {
backgroundColor: themeVars.dynamicColors.listBox.activeBackgroundColor,
},
},
},
]);