forked from timlrx/tailwind-nextjs-starter-blog
-
Notifications
You must be signed in to change notification settings - Fork 0
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
b2d0c6c
commit a0b0048
Showing
5 changed files
with
73 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1 @@ | ||
{ | ||
"markdown": 1, | ||
"code": 1, | ||
"features": 1, | ||
"next-js": 6, | ||
"math": 1, | ||
"ols": 1, | ||
"github": 1, | ||
"guide": 5, | ||
"tailwind": 3, | ||
"hello": 1, | ||
"holiday": 1, | ||
"canada": 1, | ||
"images": 1, | ||
"feature": 2, | ||
"writings": 1, | ||
"book": 1, | ||
"reflection": 1, | ||
"multi-author": 1 | ||
} | ||
{"markdown":1,"code":1,"features":1,"next-js":6,"math":1,"ols":1,"github":1,"guide":5,"tailwind":3,"hello":1,"holiday":1,"canada":1,"images":1,"feature":2,"writings":1,"book":1,"reflection":1,"multi-author":1} |
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,47 @@ | ||
'use client' | ||
|
||
import { Fragment, useEffect, useState } from 'react' | ||
import { useTheme } from 'next-themes' | ||
import { Menu, RadioGroup, Transition } from '@headlessui/react' | ||
import { headerNavOptions } from '@/data/headerNavLinks' | ||
import Link from 'next/link' | ||
|
||
export const NavOptions = () => { | ||
return ( | ||
<div className="mr-5"> | ||
<Menu as="div" className="relative inline-block text-left"> | ||
<div> | ||
{headerNavOptions.title && ( | ||
<Menu.Button className={'hidden font-medium text-gray-900 dark:text-gray-100 sm:block'}> | ||
{headerNavOptions.title} | ||
</Menu.Button> | ||
)} | ||
</div> | ||
<Transition | ||
as={Fragment} | ||
enter="transition ease-out duration-100" | ||
enterFrom="transform opacity-0 scale-95" | ||
enterTo="transform opacity-100 scale-100" | ||
leave="transition ease-in duration-75" | ||
leaveFrom="transform opacity-100 scale-100" | ||
leaveTo="transform opacity-0 scale-95" | ||
> | ||
<Menu.Items className="absolute right-0 mt-2 w-32 origin-top-right divide-y divide-gray-100 rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none dark:bg-gray-800"> | ||
<div className="p-1"> | ||
{headerNavOptions.children && headerNavOptions.children.map((link) => ( | ||
<Menu.Item> | ||
<Link | ||
key={link.title} | ||
href={link.href} | ||
className="group flex w-full items-center rounded-md px-2 py-2 text-sm"> | ||
{link.title} | ||
</Link> | ||
</Menu.Item> | ||
))} | ||
</div> | ||
</Menu.Items> | ||
</Transition> | ||
</Menu> | ||
</div> | ||
) | ||
} |
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