forked from TanStack/tanstack.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNav.js
More file actions
44 lines (42 loc) · 1.15 KB
/
Copy pathNav.js
File metadata and controls
44 lines (42 loc) · 1.15 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
import React from 'react'
import Link from 'next/link'
import Image from 'next/image'
import tw from 'twin.macro'
const links = [
{ href: 'https://github.com/tannerlinsley', label: 'GitHub' },
{ href: 'https://discord.com/invite/WrRKjPJ', label: 'Discord' },
]
export default function Nav() {
return (
<nav tw="max-w-screen-md mx-auto text-white ">
<ul tw="flex items-center justify-between p-8">
<li>
<Link href="/">
<a>
<Image
src="/img/logo-white.svg"
alt="TanStack Logo"
width={100}
height={20}
/>
</a>
</Link>
</li>
<ul tw="flex items-center justify-between space-x-2">
{links.map(({ href, label }) => (
<li key={`${href}${label}`}>
<Link href={href}>
<a
href={href}
tw="inline px-2 py-1 rounded-md transition-all hover:(bg-gray-900 bg-opacity-20)"
>
{label}
</a>
</Link>
</li>
))}
</ul>
</ul>
</nav>
)
}