11'use client'
22
3- import { Menu } from 'lucide-react'
3+ import { ChevronUp , Menu } from 'lucide-react'
44import { usePathname } from 'next/navigation'
55import { useState , useEffect , useRef } from 'react'
66
77import { DocSidebar , sections } from '@/components/docs/doc-sidebar'
8- import { Button } from '@/components/ui/button'
98import {
109 Sheet ,
1110 SheetContent ,
@@ -80,7 +79,7 @@ export default function DocsLayout({
8079 { children }
8180 </ main >
8281 </ div >
83- < div className = "flex items-center lg:hidden sticky bottom-0 z-50 bg-background/80 backdrop-blur-sm container p-4 rounded-t-lg border-t" >
82+ < div className = "lg:hidden sticky bottom-0 z-50 bg-background/80 backdrop-blur-sm rounded-t-lg border-t" >
8483 < Sheet
8584 open = { open }
8685 onOpenChange = { ( isOpen ) => {
@@ -93,10 +92,18 @@ export default function DocsLayout({
9392 } }
9493 >
9594 < SheetTrigger asChild >
96- < Button variant = "ghost" size = "icon" className = "mr-4" >
97- < Menu className = "h-5 w-5" />
98- < span className = "sr-only" > Toggle menu</ span >
99- </ Button >
95+ < button className = "flex items-center w-full px-4 py-4 hover:bg-accent/50 transition-colors" >
96+ < div className = "container flex items-center justify-between" >
97+ < div className = "flex items-center" >
98+ < Menu className = "h-5 w-5 mr-4" />
99+ < span className = "text-xl font-semibold" >
100+ { sections . find ( ( section ) => pathname . startsWith ( section . href ) )
101+ ?. title || 'Documentation' }
102+ </ span >
103+ </ div >
104+ < ChevronUp className = "h-5 w-5 text-muted-foreground" />
105+ </ div >
106+ </ button >
100107 </ SheetTrigger >
101108 < SheetContent
102109 side = "bottom"
@@ -107,12 +114,6 @@ export default function DocsLayout({
107114 </ VisuallyHidden >
108115 < DocSidebar onNavigate = { ( ) => setOpen ( false ) } />
109116 </ SheetContent >
110- < SheetTrigger asChild >
111- < h1 className = "text-xl font-semibold w-full" >
112- { sections . find ( ( section ) => pathname . startsWith ( section . href ) )
113- ?. title || 'Documentation' }
114- </ h1 >
115- </ SheetTrigger >
116117 </ Sheet >
117118 </ div >
118119 </ div >
0 commit comments