forked from traefik/traefiklabs-header-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDrawerNav.tsx
151 lines (138 loc) · 6.35 KB
/
DrawerNav.tsx
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
import Link from 'components/Link'
import React from 'react'
import styled from 'styled-components'
import Chevron from './ChevronDown'
function toggleMenu(e: React.MouseEvent<HTMLDivElement, MouseEvent>) {
e.currentTarget.classList.toggle('open')
}
interface Props {
isDrawerOpen: boolean
}
const SubLink = styled(Link)`
font-weight: 400;
&:hover {
text-decoration: none;
}
`
const Badge = styled.p`
padding: 1px 5px;
font-weight: 600;
font-size: 12px;
line-height: 16px;
background-color: #d5ea48;
border-radius: 9999px;
display: inline;
margin-left: 8px;
`
const DrawerNav = ({ isDrawerOpen }: Props) => {
return (
<div className={'drawer-menu pull-left ' + (isDrawerOpen ? 'open' : '')}>
<div className="navigation">
<div className="menu-item-wrapper menu-item-wrapper--expandable" onClick={(e) => toggleMenu(e)}>
<div className="menu-item menu-item--with-icon">
<span className="title">Products</span>
<span className="icon">
<Chevron />
</span>
</div>
<div className="sub-menu">
<SubLink href="https://traefik.io/traefik/">Traefik Proxy</SubLink>
<SubLink href="https://traefik.io/traefik-hub-api-gateway/">Traefik Hub API Gateway</SubLink>
<SubLink href="https://traefik.io/traefik-hub/">Traefik Hub API Management</SubLink>
<SubLink href="https://traefik.io/solutions/ai-gateway">AI Gateway</SubLink>
<SubLink href="https://traefik.io/solutions/api-mocking">API Mocking</SubLink>
</div>
</div>
<div className="menu-item-wrapper menu-item-wrapper--expandable" onClick={(e) => toggleMenu(e)}>
<div className="menu-item menu-item--with-icon">
<div className="menu-item__title">
<span className="title">Solutions</span>
<div className="icon-wrapper">
<svg width="10" height="10" viewBox="0 0 10 10">
<g transform="translate(-502 -16)" stroke="#AABB39" fill="none" fill-rule="evenodd">
<circle stroke-opacity=".5" stroke-width="2" fill="#D5EA48" cx="507" cy="21" r="4"></circle>
<circle cx="507" cy="21" r="3.5"></circle>
</g>
</svg>
</div>
</div>
<span className="icon">
<Chevron />
</span>
</div>
<div className="sub-menu">
<SubLink href="https://traefik.io/solutions/ai-gateway/">
AI Gateway
<Badge>New!</Badge>
</SubLink>
<SubLink href="https://traefik.io/solutions/api-gateway/">Modern API Gateway</SubLink>
<SubLink href="https://traefik.io/solutions/api-mocking/">
API Mocking <Badge>New!</Badge>
</SubLink>
<SubLink href="https://traefik.io/solutions/api-management/">GitOps-Driven API Management</SubLink>
<SubLink href="https://traefik.io/solutions/waf/">
Web Application Firewall <Badge>New!</Badge>
</SubLink>
<SubLink href="https://traefik.io/solutions/api-governance/">
Runtime API Governance <Badge>New!</Badge>
</SubLink>
<SubLink href="https://traefik.io/solutions/kubernetes-ingress/">Kubernetes Ingress</SubLink>
<SubLink href="https://traefik.io/solutions/docker-swarm-ingress/">Docker Swarm Ingress</SubLink>
<SubLink href="https://traefik.io/solutions/hashicorp-and-traefik/">
Traefik & HashiCrop <Badge>New!</Badge>
</SubLink>
</div>
</div>
<div className="menu-item-wrapper menu-item-wrapper--expandable" onClick={(e) => toggleMenu(e)}>
<span className="menu-item menu-item--with-icon">
<span className="title">Learn</span>
<span className="icon">
<Chevron />
</span>
</span>
<div className="sub-menu">
<SubLink href="https://traefik.io/blog/">Blog</SubLink>
<SubLink href="https://traefik.io/resources/">Resource Library</SubLink>
<SubLink href="https://academy.traefik.io/">Traefik Academy</SubLink>
<SubLink href="https://traefik.io/success-stories/">Success Stories</SubLink>
<SubLink href="https://traefik.io/glossary/">Glossary</SubLink>
<SubLink href="https://traefik.io/events/">Events</SubLink>
<SubLink href="https://doc.traefik.io">Docs</SubLink>
<SubLink href="https://plugins.traefik.io/">Plugin Catalog</SubLink>
<SubLink href="https://community.traefik.io/">Forum</SubLink>
<SubLink href="https://traefik.io/community/">Community</SubLink>
</div>
</div>
<div className="menu-item-wrapper menu-item-wrapper--expandable" onClick={(e) => toggleMenu(e)}>
<span className="menu-item menu-item--with-icon">
<span className="title">Compare</span>
<span className="icon">
<Chevron />
</span>
</span>
<div className="sub-menu">
<SubLink href="https://traefik.io/compare/traefik-vs-kong-konnect/">vs Kong Konnect</SubLink>
<SubLink href="https://traefik.io/compare/traefik-vs-aws-api-gateway/">vs AWS API Gateway</SubLink>
<SubLink href="https://traefik.io/compare/traefik-vs-azure-api-management/">vs Azure APIM</SubLink>
<SubLink href="https://traefik.io/compare/traefik-vs-nginx/">vs NGINX</SubLink>
<SubLink href="https://traefik.io/compare/traefik-vs-solo-gloo-gateway/">vs Solo.io Gloo Gateway</SubLink>
<SubLink href="https://traefik.io/compare/traefik-vs-tyk">vs Tyk</SubLink>
<SubLink href="https://traefik.io/compare/traefik-vs-gravitee/">vs Gravitee</SubLink>
<SubLink href="https://traefik.io/compare/traefik-vs-envoy-gateway">vs Envoy Gateway</SubLink>
</div>
</div>
<div className="menu-item-wrapper">
<SubLink href="https://traefik.io/pricing/" className="menu-item">
Pricing
</SubLink>
</div>
<div className="menu-item-wrapper">
<SubLink href="https://traefik.io/contact-us/" className="menu-item">
Get in Touch
</SubLink>
</div>
</div>
</div>
)
}
export default DrawerNav