@@ -35,59 +35,57 @@ export const DesktopNav = () => {
3535 } , [ toggleSidebarCollapsed ] ) ;
3636
3737 return (
38- < >
39- < motion . div
40- initial = { {
41- width : sidebarCollapsed ? "70px" : "230px" ,
42- } }
43- animate = { {
44- width : sidebarCollapsed ? "70px" : "230px" ,
45- transition : {
46- duration : 0.6 ,
47- type : "spring" ,
48- bounce : 0.25 ,
49- } ,
50- } }
51- className = { clsx ( "hidden z-50 h-full lg:flex group" , "relative" ) }
52- >
53- < div className = "flex flex-col w-full max-w-[220px] mx-auto h-full" >
54- < div className = "flex justify-start items-center px-3 pt-5 mb-3.5 w-full truncate min-h-8" >
55- < Link href = "/dashboard" >
56- < Logo
57- hideLogoName = { sidebarCollapsed }
58- className = "mx-auto w-[120px] h-[40px]"
59- />
60- </ Link >
61- </ div >
38+ < motion . div
39+ initial = { {
40+ width : sidebarCollapsed ? "70px" : "230px" ,
41+ } }
42+ animate = { {
43+ width : sidebarCollapsed ? "70px" : "230px" ,
44+ transition : {
45+ duration : 0.6 ,
46+ type : "spring" ,
47+ bounce : 0.25 ,
48+ } ,
49+ } }
50+ className = { clsx ( "hidden z-50 h-full lg:flex group" , "relative" ) }
51+ >
52+ < div className = "flex flex-col w-full max-w-[220px] mx-auto h-full" >
53+ < div className = "flex justify-start items-center px-3 pt-5 mb-3.5 w-full truncate min-h-8" >
54+ < Link href = "/dashboard" >
55+ < Logo
56+ hideLogoName = { sidebarCollapsed }
57+ className = "mx-auto w-[120px] h-[40px]"
58+ />
59+ </ Link >
60+ </ div >
6261
63- < div className = "flex overflow-y-auto flex-col flex-grow" >
64- < div className = "flex flex-col px-3 h-full" >
65- < AdminNavItems />
66- </ div >
62+ < div className = "flex overflow-y-auto flex-col flex-grow" >
63+ < div className = "flex flex-col px-3 h-full" >
64+ < AdminNavItems />
6765 </ div >
66+ </ div >
6867
69- < Tooltip
70- kbd = { [ cmdSymbol , "Shift" , "S" ] }
71- position = "right"
72- content = "Toggle collapse"
68+ < Tooltip
69+ kbd = { [ cmdSymbol , "Shift" , "S" ] }
70+ position = "right"
71+ content = "Toggle collapse"
72+ >
73+ < Button
74+ variant = "white"
75+ onClick = { toggleSidebarCollapsed }
76+ className = "absolute right-[-12px] size-7 p-0 min-w-[unset] top-[50%] transform -translate-y-1/2 rounded-full transition-colors z-10"
7377 >
74- < Button
75- variant = "dark"
76- onClick = { toggleSidebarCollapsed }
77- className = "absolute right-[-12px] size-7 p-0 min-w-[unset] hover:border-gray-3 hover:bg-gray-2 top-[50%] transform -translate-y-1/2 rounded-full border bg-gray-1 border-gray-3 transition-colors z-10"
78- >
79- < ChevronRight
80- size = { 14 }
81- className = { clsx (
82- "transition-transform duration-200 text-gray-12" ,
83- sidebarCollapsed ? "rotate-180" : "" ,
84- ) }
85- />
86- </ Button >
87- </ Tooltip >
88- </ div >
89- </ motion . div >
90- </ >
78+ < ChevronRight
79+ size = { 14 }
80+ className = { clsx (
81+ "transition-transform duration-200 text-gray-12" ,
82+ sidebarCollapsed ? "rotate-180" : "" ,
83+ ) }
84+ />
85+ </ Button >
86+ </ Tooltip >
87+ </ div >
88+ </ motion . div >
9189 ) ;
9290} ;
9391
0 commit comments