blob: f6f32ee7a79fc694858c07465128dabfee7302f7 (
plain) (
blame)
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
|
import * as React from 'react';
import styled from 'styled-components';
export class MobileNav extends React.PureComponent {
public render(): React.Node {
const { isToggled, toggleMobileNav } = this.props;
return (
<Wrap isToggled={isToggled}>
<Section>
<ul>
<li>0x instant</li>
<li>0x Launch Kit</li>
</ul>
</Section>
<Section isDark={true}>
a
</Section>
{isToggled &&
<Overlay onClick={toggleMobileNav} />
}
</Wrap>
);
}
}
const Wrap = styled.nav`
width: 100%;
height: 357px;
background-color: ${props => props.theme.mobileNavBgUpper};
color: ${props => props.theme.mobileNavColor};
transition: transform 0.5s;
transform: translate3d(0, ${props => props.isToggled ? 0 : '-100%'}, 0);
position: fixed;
display: flex;
flex-direction: column;
justify-content: flex-end;
z-index: 999;
top: 0;
left: 0;
`;
const Overlay = styled.div`
position: absolute;
width: 100vw;
height: 100vh;
top: 100%;
background: transparent;
cursor: pointer;
`;
const Section = styled.div`
width: 100%;
padding: 30px;
background-color: ${props => props.isDark && props.theme.mobileNavBgLower};
`;
|