-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Expand file tree
/
Copy pathThumbButton.ts
More file actions
75 lines (64 loc) · 1.74 KB
/
ThumbButton.ts
File metadata and controls
75 lines (64 loc) · 1.74 KB
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
65
66
67
68
69
70
71
72
73
74
75
import CSSTokens from '../CSSTokens';
export default function () {
return {
'&.webchat__thumb-button': {
alignItems: 'center',
appearance: 'none',
background: 'transparent',
border: 0,
borderRadius: 2,
boxSizing: 'content-box',
display: 'grid',
gridTemplateAreas: `"icon"`,
height: 16,
justifyContent: 'center',
padding: 0,
width: 16,
'&.webchat__thumb-button--large': {
border: '1px solid transparent',
borderRadius: '4px',
height: '20px',
padding: '5px',
width: '20px',
'& .webchat__thumb-button__image': {
color: 'currentColor',
fontSize: '20px',
height: '1em',
width: '1em'
},
'&:hover, &:active, &.webchat__thumb-button--is-pressed': {
background: 'transparent',
color: CSSTokens.ColorAccent
},
'&[aria-disabled="true"]': {
color: CSSTokens.ColorSubtle
}
},
'&:active': {
background: '#EDEBE9'
},
'&:focus-visible': {
outline: 'solid 1px #605E5C'
},
'& .webchat__thumb-button__image': {
color: CSSTokens.ColorAccent,
gridArea: 'icon',
visibility: 'hidden',
width: 14,
'&.webchat__thumb-button__image--is-stroked': {
visibility: 'unset'
}
},
'&:not([aria-disabled="true"]):hover, &.webchat__thumb-button--is-pressed': {
'& .webchat__thumb-button__image': {
'&.webchat__thumb-button__image--is-stroked': {
visibility: 'hidden'
},
'&.webchat__thumb-button__image--is-filled': {
visibility: 'unset'
}
}
}
}
};
}