File tree Expand file tree Collapse file tree 4 files changed +18
-11
lines changed
Expand file tree Collapse file tree 4 files changed +18
-11
lines changed Original file line number Diff line number Diff line change @@ -54,14 +54,14 @@ export function MainNav({ items }: MainNavProps) {
5454 </ nav >
5555 ) : null }
5656 < button
57- className = "flex items-center space-x-2 md:hidden"
57+ className = "flex items-center space-x-2 md:hidden focus-visible:outline-0 focus-visible:border-0 focus-within:outline-0 focus-within:border-0 "
5858 onClick = { ( ) => setShowMobileMenu ( ! showMobileMenu ) }
5959 >
6060 { showMobileMenu ? < Icons . cancel /> : < Icons . logo className = "w-6 h-6 dark:invert" /> }
6161 < span className = "font-bold" > Menu</ span >
6262 </ button >
6363 { showMobileMenu && items && (
64- < MobileNav items = { items } />
64+ < MobileNav items = { items } setShowMobileMenu = { setShowMobileMenu } />
6565 ) }
6666 </ div >
6767 < nav >
Original file line number Diff line number Diff line change 11import * as React from "react" ;
22import Link from "next/link" ;
33
4+ import { cn } from "@/lib/utils" ;
45import { MainNavItem } from "@/types" ;
6+ import { Icons } from "@/components/icons" ;
57import { siteConfig } from "@/config/site" ;
6- import { cn } from "@/lib/utils" ;
78import { useLockBody } from "@/hooks/use-lock-body" ;
8- import { Icons } from "@/components/icons" ;
99
1010interface MobileNavProps {
11- items : MainNavItem [ ]
11+ items : MainNavItem [ ] ,
12+ setShowMobileMenu : React . Dispatch < React . SetStateAction < boolean > > ,
1213 children ?: React . ReactNode
1314}
1415
15- export function MobileNav ( { items } : MobileNavProps ) {
16+ export function MobileNav ( { items, setShowMobileMenu } : MobileNavProps ) {
1617 useLockBody ( ) ;
1718
1819 return (
@@ -31,6 +32,7 @@ export function MobileNav({ items }: MobileNavProps) {
3132 "flex w-full items-center rounded-md py-2 font-medium hover:underline" ,
3233 item . disabled && "cursor-not-allowed opacity-60"
3334 ) }
35+ onClick = { ( ) => ! item . disabled && setShowMobileMenu ( false ) }
3436 >
3537 { item . title }
3638 </ Link >
Original file line number Diff line number Diff line change @@ -8,15 +8,16 @@ export const navConfig: NavConfig = {
88 } ,
99 {
1010 title : "Blog" ,
11- href : "/blog"
11+ href : "/blog" ,
12+ disabled : true // Pending Feature Built
13+ } ,
14+ {
15+ title : "Tools" ,
16+ href : "/#tools"
1217 } ,
1318 {
1419 title : "Projects" ,
1520 href : "/#projects"
1621 } ,
17- {
18- title : "Tools" ,
19- href : "/#tools"
20- }
2122 ]
2223}
Original file line number Diff line number Diff line change 7575 }
7676}
7777
78+ html {
79+ @apply scroll-smooth;
80+ }
81+
7882.m-itbey {
7983 @apply inline-flex gap-1 items-center align-bottom
8084}
You can’t perform that action at this time.
0 commit comments