From ab4633d0d1824afc820b1c1f9f77560fe25cce79 Mon Sep 17 00:00:00 2001 From: Xin Wang Date: Fri, 5 Jun 2026 15:17:47 +0800 Subject: [PATCH] Refactor Sidebar component styles for improved layout and interaction Updated the Sidebar component to enhance the collapsed state behavior by adjusting CSS classes for better responsiveness and visual consistency. Improved the transition effects and layout of the toggle button, ensuring a smoother user experience when interacting with the sidebar. --- src/components/layout/Sidebar.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/layout/Sidebar.tsx b/src/components/layout/Sidebar.tsx index dfc31e6..90c97ad 100644 --- a/src/components/layout/Sidebar.tsx +++ b/src/components/layout/Sidebar.tsx @@ -179,8 +179,8 @@ export function Sidebar({ @@ -203,8 +203,8 @@ export function Sidebar({ onClick={onToggle} title={collapsed ? "展开侧栏" : "收起侧栏"} className={[ - "group flex h-10 w-full items-center gap-2 overflow-hidden rounded-full border border-hairline-strong text-sm text-muted-foreground transition-[background-color,color,border-color,transform] duration-200 hover:bg-surface-strong hover:text-foreground active:scale-[0.98]", - collapsed ? "justify-center px-0" : "justify-between px-3.5", + "group flex h-10 w-full items-center overflow-hidden rounded-full border border-hairline-strong text-sm text-muted-foreground transition-[background-color,color,border-color,transform] duration-200 hover:bg-surface-strong hover:text-foreground active:scale-[0.98]", + collapsed ? "justify-center gap-0 px-0" : "justify-between gap-2 px-3.5", ].join(" ")} >