forked from cerebral/overmind
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathelements.tsx
More file actions
61 lines (54 loc) · 1.29 KB
/
elements.tsx
File metadata and controls
61 lines (54 loc) · 1.29 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
import styled from '../../styled-components'
export const Wrapper = styled.div`
display: flex;
align-items: center;
`
export const ListWrapper = styled.div`
position: fixed;
top: 0;
z-index: 1;
box-sizing: border-box;
width: 150px;
padding-top: 50px;
height: 100vh;
right: calc(50% + 350px);
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
`
export const List = styled.ul`
list-style-type: none;
margin: 0;
padding: 0;
a {
text-decoration: none;
display: block;
color: ${({ theme }) => theme.color.white};
:hover {
color: #fff;
}
}
`
export const Item = styled<
{
selected: boolean
},
'li'
>('li')`
padding: ${({ theme }) => `${theme.padding.smaller} ${theme.padding.small}`};
color: ${({ theme }) => theme.color.white};
border-left: 2px solid
${({ theme, selected }) => (selected ? theme.color.primary : 'transparent')};
background-color: ${({ theme, selected }) =>
selected ? theme.color.lighten(theme.color.dark, 0.2) : 'transparent'};
`
export const TocList = styled.ul`
padding: 0;
list-style-type: none;
padding-left: 0.8em;
padding-top: ${({ theme }) => theme.padding.smallerer};
font-size: 0.8em;
margin: 0;
`
export const TocItem = styled.li`
padding: ${({ theme }) => theme.padding.smallerer};
`