-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathSideMenu.js
More file actions
94 lines (81 loc) · 1.77 KB
/
Copy pathSideMenu.js
File metadata and controls
94 lines (81 loc) · 1.77 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
import React from 'react'
import { Link } from 'gatsby'
import styled from 'styled-components'
import { slide as BurgerMenu } from 'react-burger-menu'
const StyledBurgerMenu = styled.div`
/* Position and sizing of burger button */
.bm-burger-button {
position: fixed;
width: 36px;
height: 30px;
left: 36px;
top: 36px;
}
/* Color/shape of burger icon bars */
.bm-burger-bars {
background: #ffffff;
}
/* Position and sizing of clickable cross button */
.bm-cross-button {
height: 24px;
width: 24px;
}
/* Color/shape of close button cross */
.bm-cross {
background: #ffffff;
}
/* General sidebar styles */
.bm-menu {
background: rgb(0, 0, 0, 0.5);
padding: 2.5em 1em 0;
font-size: 1.15em;
}
/* Morph shape necessary with bubble or elastic */
.bm-morph-shape {
fill: #373a47;
}
/* Wrapper for item list */
.bm-item-list {
padding-top: 2em;
${'' /* color: #b8b7ad; */}
}
/* Individual item */
.bm-item {
display: inline-block;
padding: 0.5em;
}
/* Styling of overlay */
.bm-overlay {
background: rgba(0, 0, 0, 0.3);
}
`
const MenuLink = styled(Link)`
position: relative;
display: flex;
align-items: center;
color: #fff;
border: 0;
margin: 0;
margin-right: 0.5rem;
padding-left: 20px;
padding-right: 20px;
min-width: 42px;
z-index: 10;
`
class Header extends React.Component {
render() {
const { headerLinks } = this.props
return (
<StyledBurgerMenu>
<BurgerMenu>
{headerLinks.map((headerLink, i) => (
<MenuLink to={headerLink.url} key={`header-link-${i}`}>
{headerLink.label}
</MenuLink>
))}
</BurgerMenu>
</StyledBurgerMenu>
)
}
}
export default Header