From 143a039f46f0eda10813bd14b0cf3e0aca764e9e Mon Sep 17 00:00:00 2001 From: shinya Date: Thu, 19 Jun 2025 10:10:37 +0800 Subject: [PATCH] style: adjust sidebar style --- src/components/layout/Sidebar.tsx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/components/layout/Sidebar.tsx b/src/components/layout/Sidebar.tsx index 6779df0..0a0dabb 100644 --- a/src/components/layout/Sidebar.tsx +++ b/src/components/layout/Sidebar.tsx @@ -195,9 +195,7 @@ const Sidebar = ({ onToggle, activePath = '/' }: SidebarProps) => { onClick={() => setActive('/')} data-active={active === '/'} className={`group flex items-center rounded-lg px-2 py-2 pl-4 text-gray-700 hover:bg-gray-100/30 hover:text-green-600 data-[active=true]:bg-green-500/20 data-[active=true]:text-green-700 font-medium transition-colors duration-200 min-h-[40px] ${ - isCollapsed - ? 'w-full max-w-none mx-0' - : 'max-w-[220px] mx-auto' + isCollapsed ? 'w-full max-w-none mx-0' : 'mx-0' } gap-3 justify-start`} >
@@ -218,9 +216,7 @@ const Sidebar = ({ onToggle, activePath = '/' }: SidebarProps) => { }} data-active={active === '/search'} className={`group flex items-center rounded-lg px-2 py-2 pl-4 text-gray-700 hover:bg-gray-100/30 hover:text-green-600 data-[active=true]:bg-green-500/20 data-[active=true]:text-green-700 font-medium transition-colors duration-200 min-h-[40px] ${ - isCollapsed - ? 'w-full max-w-none mx-0' - : 'max-w-[220px] mx-auto' + isCollapsed ? 'w-full max-w-none mx-0' : 'mx-0' } gap-3 justify-start`} >
@@ -259,9 +255,7 @@ const Sidebar = ({ onToggle, activePath = '/' }: SidebarProps) => { onClick={() => setActive(item.href)} data-active={isActive} className={`group flex items-center rounded-lg px-2 py-2 pl-4 text-gray-700 hover:bg-gray-100/30 hover:text-green-600 data-[active=true]:bg-green-500/20 data-[active=true]:text-green-700 transition-colors duration-200 min-h-[40px] ${ - isCollapsed - ? 'w-full max-w-none mx-0' - : 'max-w-[220px] mx-auto' + isCollapsed ? 'w-full max-w-none mx-0' : 'mx-0' } gap-3 justify-start`} >