-
Notifications
You must be signed in to change notification settings - Fork 2
/
MenuList.js
63 lines (57 loc) · 1.23 KB
/
MenuList.js
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
import React from "react";
import styled, { css } from "styled-components";
const StyledMenuList = styled.ul`
display: grid;
grid-gap: 10px;
padding: 0;
list-style: none;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
a {
background: ${props => props.theme.backgroundColor};
display: block;
text-decoration: none;
padding: 10px;
text-align: center;
color: ${props => props.theme.fontColor};
text-transform: uppercase;
font-size: 20px;
}
@media (max-width: 1000px) {
max-height: 0;
overflow: hidden;
transform: rotateX(90deg);
transition: all 0.5s;
${props =>
props.open
? css`
max-height: 500px;
transform: rotateX(0);
`
: css`
max-height: 0;
transform: rotateX(90deg);
`}
}
`;
const MenuList = ({ open }) => {
return (
<StyledMenuList open={open}>
<li>
<a href="">Tacos</a>
</li>
<li>
<a href="">Beers</a>
</li>
<li>
<a href="">Wines</a>
</li>
<li>
<a href="">Desserts</a>
</li>
<li>
<a href="">Reservations</a>
</li>
</StyledMenuList>
);
};
export default MenuList;