From f22605ccf0f52c9f891c616b631ae912e7b83ddb Mon Sep 17 00:00:00 2001 From: darknight0847 Date: Sun, 7 Dec 2025 00:40:28 +0530 Subject: [PATCH] add hover expand & auto collapse(#231) --- apps/web/src/components/dashboard/Sidebar.tsx | 33 ++++++++++++------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/apps/web/src/components/dashboard/Sidebar.tsx b/apps/web/src/components/dashboard/Sidebar.tsx index d27c636e..a897de8b 100644 --- a/apps/web/src/components/dashboard/Sidebar.tsx +++ b/apps/web/src/components/dashboard/Sidebar.tsx @@ -110,18 +110,27 @@ export default function Sidebar({ overlay = false }: { overlay?: boolean }) { const mobileWidth = desktopWidth; return ( - + { + if (!overlay && isCollapsed) toggleCollapsed(); + }} + onMouseLeave={() => { + if (!overlay && !isCollapsed) toggleCollapsed(); + }} + > + {/* Mobile header */}