File size: 1,747 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
// @flow
import theme from 'shared/theme';
import styled, { css } from 'styled-components';
import { Transition, Shadow, zIndex, hexa } from 'src/components/globals';

export const Wrapper = styled.div`
  display: inline-block;

  ${props =>
    props.darkContext &&
    css`
      > button {
        color: ${theme.text.reverse};
        transition: ${Transition.hover.off};

        &:hover {
          color: ${theme.text.reverse};
          transform: scale(1.1);
          transition: ${Transition.hover.on};
        }
      }
    `};
`;

export const Absolute = styled.div`
  display: ${props => (props.open ? 'flex' : 'none')};
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  width: 100vw;
  min-width: 100vw;
  height: 100%;
  min-height: 100%;
  z-index: 1;

  button {
    color: ${theme.text.reverse};
    z-index: 2;
    align-self: flex-start;
    margin-top: ${props => (props.hasNavBar ? '56px' : '8px')};
    margin-left: 8px;
  }

  button:hover {
    color: ${theme.text.reverse};
  }
`;

export const MenuContainer = styled.div`
  position: relative;
  display: flex;
  flex-direction: column;
  align-content: start;
  justify-content: stretch;
  left: 0;
  top: 0;
  bottom: 0;
  height: 100%;
  width: 300px;
  color: ${theme.brand.alt};
  background-color: ${theme.bg.wash};
  box-shadow: ${Shadow.high} ${props => hexa(props.theme.bg.reverse, 0.25)};
  padding-top: ${props => (props.hasNavBar ? '48px' : '0')};
  z-index: ${zIndex.fullscreen + 1};
`;

export const MenuOverlay = styled.div`
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  width: 100vw;
  min-width: 100vw;
  height: 100vh;
  min-height: 100vh;
  background-color: ${props => hexa(props.theme.bg.reverse, 0.5)};
`;