-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
2 changed files
with
41 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,48 @@ | ||
import { HamburgerMenuIcon, Cross1Icon } from '@radix-ui/react-icons'; | ||
import { useState } from 'react'; | ||
import classNames from 'classnames'; | ||
import { NAVIGATION_ITEMS } from '../common/constants'; | ||
|
||
interface Props { | ||
className?: string | ||
} | ||
|
||
const SideNavigation: React.FC<Props> = ({ className }) => ( | ||
<nav className={classNames('p-6 border-r-2 border-r-zinc-200 min-w-max', className)}> | ||
{/* <HamburgerMenuIcon className='h-8 w-8' /> */} | ||
const SideNavigation: React.FC<Props> = ({ className }) => { | ||
const [isOpen, setOpen] = useState(false); | ||
|
||
{/* <Cross1Icon className='h-8 w-8' /> */} | ||
return ( | ||
<nav className={classNames('flex flex-col items-center p-6 border-r-2 border-r-zinc-200 min-w-max', className)}> | ||
<button onClick={() => setOpen(!isOpen)}> | ||
{isOpen ? ( | ||
<Cross1Icon className='h-8 w-8' /> | ||
|
||
<div className='flex flex-col gap-1'> | ||
{NAVIGATION_ITEMS.map(({ name, link }) => ( | ||
<a href={link} key={link}> | ||
{name} | ||
</a> | ||
))} | ||
</div> | ||
</nav> | ||
); | ||
) : ( | ||
<HamburgerMenuIcon className='h-8 w-8' /> | ||
)} | ||
</button> | ||
|
||
|
||
<div className='flex flex-col gap-1 mt-4'> | ||
{isOpen ? | ||
NAVIGATION_ITEMS.map(({ name, link }) => ( | ||
<a href={link} key={link}> | ||
{name} | ||
</a> | ||
)) | ||
: ( | ||
<div | ||
className='uppercase text-xl font-light' | ||
style={{ | ||
textOrientation: 'upright', | ||
writingMode: 'vertical-lr', | ||
}} | ||
> | ||
setsun.xyz | ||
</div> | ||
)} | ||
</div> | ||
</nav> | ||
); | ||
} | ||
|
||
export default SideNavigation; |
bf87b43
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
setsun-xyz – ./
setsun-xyz-setsun.vercel.app
setsun-xyz-git-main-setsun.vercel.app
www.setsun.xyz
setsun.xyz