-
Notifications
You must be signed in to change notification settings - Fork 4
/
elements.ts
75 lines (61 loc) · 1.65 KB
/
elements.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
65
66
67
68
69
70
71
72
73
74
75
import styled from 'styled-components';
import { animated } from 'react-spring/renderprops';
import theme from '../../../common/theme';
export const Container = styled(animated.div)`
position: fixed;
font-size: 0.75rem;
background-color: ${() => theme.background4()};
color: rgba(255, 255, 255, 0.6);
box-shadow: -1px 3px 4px rgba(0, 0, 0, 0.3);
border-radius: 3px;
z-index: 40;
overflow: hidden;
padding: 4px 0;
transform-origin: 0% 0%;
font-weight: 600;
`;
export const Item = styled.button`
transition: 0.2s ease all;
display: flex;
align-items: center;
padding: 0.6rem 1rem;
border: none;
outline: none;
background-color: transparent;
color: inherit;
font-family: inherit;
font-weight: inherit;
border-left: 2px solid transparent;
cursor: pointer;
width: 100%;
min-width: 10rem;
svg {
margin-right: 0.75rem;
font-size: 0.75rem;
}
&:last-child {
border-bottom-color: transparent;
}
&:hover {
color: ${props => (props.color ? props.color : theme.secondary())};
background-color: ${() => theme.background2.lighten(0.3)()};
border-left-color: ${props =>
props.color ? props.color : theme.secondary()};
}
&:focus {
color: ${props => (props.color ? props.color : theme.secondary())};
background-color: ${() => theme.background2.lighten(0.3)()};
border-left-color: ${props =>
props.color ? props.color : theme.secondary()};
}
`;
export const ItemContainer = styled.div`
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
padding-bottom: 4px;
margin-bottom: 4px;
&:last-child {
border-bottom: inherit;
padding-bottom: 0;
margin-bottom: 0;
}
`;