-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
62790c6
commit ae1049c
Showing
5 changed files
with
133 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
'use client' | ||
|
||
import favicon from '@/public/favicon.png' | ||
import { Dialog } from '@headlessui/react' | ||
import { Bars3Icon, XMarkIcon } from '@heroicons/react/24/outline' | ||
import Image from 'next/image' | ||
import Link from 'next/link' | ||
import { useState } from 'react' | ||
|
||
export function Navbar() { | ||
const [mobileMenuOpen, setMobileMenuOpen] = useState(false) | ||
|
||
return ( | ||
<> | ||
<nav | ||
className="mx-auto flex max-w-2xl items-center justify-between p-6 lg:px-8" | ||
aria-label="Global" | ||
> | ||
<div className="flex lg:flex-1"> | ||
<Link href="/" className="-m-1.5 p-1.5"> | ||
<span className="sr-only">Your Company</span> | ||
<Image className="h-8 w-auto" src={favicon} alt="" /> | ||
</Link> | ||
</div> | ||
<div className="flex lg:hidden"> | ||
<button | ||
type="button" | ||
className="-m-2.5 inline-flex items-center justify-center rounded-md p-2.5 text-gray-700" | ||
onClick={() => setMobileMenuOpen(true)} | ||
> | ||
<span className="sr-only">Open main menu</span> | ||
<Bars3Icon className="h-6 w-6" aria-hidden="true" /> | ||
</button> | ||
</div> | ||
<div className="hidden lg:flex lg:gap-x-12"> | ||
<Link | ||
href="/" | ||
className="text-sm font-semibold leading-6 text-gray-900" | ||
> | ||
Product | ||
</Link> | ||
<Link | ||
href="/" | ||
className="text-sm font-semibold leading-6 text-gray-900" | ||
> | ||
Features | ||
</Link> | ||
<Link | ||
href="/" | ||
className="text-sm font-semibold leading-6 text-gray-900" | ||
> | ||
Marketplace | ||
</Link> | ||
<Link | ||
href="/" | ||
className="text-sm font-semibold leading-6 text-gray-900" | ||
> | ||
Company | ||
</Link> | ||
</div> | ||
</nav> | ||
<Dialog | ||
as="div" | ||
className="lg:hidden" | ||
open={mobileMenuOpen} | ||
onClose={setMobileMenuOpen} | ||
> | ||
<div className="fixed inset-0 z-10" /> | ||
<Dialog.Panel className="fixed inset-y-0 right-0 z-10 w-full overflow-y-auto bg-white px-6 py-6 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10"> | ||
<div className="flex items-center justify-between"> | ||
<Link href="/" className="-m-1.5 p-1.5"> | ||
<span className="sr-only">Your Company</span> | ||
<img | ||
className="h-8 w-auto" | ||
src="https://tailwindui.com/img/logos/mark.svg?color=indigo&shade=600" | ||
alt="" | ||
/> | ||
</Link> | ||
<button | ||
type="button" | ||
className="-m-2.5 rounded-md p-2.5 text-gray-700" | ||
onClick={() => setMobileMenuOpen(false)} | ||
> | ||
<span className="sr-only">Close menu</span> | ||
<XMarkIcon className="h-6 w-6" aria-hidden="true" /> | ||
</button> | ||
</div> | ||
<div className="mt-6 flow-root"> | ||
<div className="-my-6 divide-y divide-gray-500/10"> | ||
<div className="space-y-2 py-6"> | ||
<Link | ||
href="/" | ||
className="-mx-3 block rounded-lg px-3 py-2 text-base font-semibold leading-7 text-gray-900 hover:bg-gray-50" | ||
> | ||
Product | ||
</Link> | ||
<Link | ||
href="/" | ||
className="-mx-3 block rounded-lg px-3 py-2 text-base font-semibold leading-7 text-gray-900 hover:bg-gray-50" | ||
> | ||
Features | ||
</Link> | ||
<Link | ||
href="/" | ||
className="-mx-3 block rounded-lg px-3 py-2 text-base font-semibold leading-7 text-gray-900 hover:bg-gray-50" | ||
> | ||
Marketplace | ||
</Link> | ||
<Link | ||
href="/" | ||
className="-mx-3 block rounded-lg px-3 py-2 text-base font-semibold leading-7 text-gray-900 hover:bg-gray-50" | ||
> | ||
Company | ||
</Link> | ||
</div> | ||
</div> | ||
</div> | ||
</Dialog.Panel> | ||
</Dialog> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters