File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
frontend/src/component/template Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -17,16 +17,20 @@ export default function NavbarLayout() {
1717 }
1818
1919 return (
20- < div
21- className = 'relative h-screen w-[20%] rounded-[11px] bg-lightblue dark:bg-darkblue'
20+ < motion . div
21+ animate = { {
22+ width : isNavbarOpen ? '20%' : '0%'
23+ } }
24+ transition = { { duration : 0.3 , ease : 'easeInOut' } }
25+ className = 'relative h-screen rounded-[11px] bg-lightblue dark:bg-darkblue'
2226 onMouseEnter = { ( ) => setIsHovered ( true ) }
2327 onMouseLeave = { ( ) => setIsHovered ( false ) } >
2428 < AnimatePresence >
2529 { isNavbarOpen && (
2630 < motion . div
27- initial = { { width : 0 , opacity : 0 , x : - 50 } }
28- animate = { { width : '100%' , opacity : 1 , x : 0 } }
29- exit = { { width : 0 , opacity : 0 , x : - 50 } }
31+ initial = { { opacity : 0 , x : - 50 } }
32+ animate = { { opacity : 1 , x : 0 } }
33+ exit = { { opacity : 0 , x : - 50 } }
3034 transition = { { duration : 0.3 , ease : 'easeInOut' } } >
3135 < Navbar />
3236 { isHovered && (
@@ -57,6 +61,6 @@ export default function NavbarLayout() {
5761 < ChevronRight size = { 20 } />
5862 </ motion . button >
5963 ) }
60- </ div >
64+ </ motion . div >
6165 ) ;
6266}
You can’t perform that action at this time.
0 commit comments