diff --git a/packages/ui/src/shadcn/sidebar.tsx b/packages/ui/src/shadcn/sidebar.tsx index 9ea913cb9..4df3be872 100644 --- a/packages/ui/src/shadcn/sidebar.tsx +++ b/packages/ui/src/shadcn/sidebar.tsx @@ -526,7 +526,7 @@ const SidebarMenuItem: React.FC> = ({
  • {children.map((child) => { - if (child.renderAction) { - return ( - - {child.renderAction} - - ); - } - const isActive = isRouteActive( child.path, currentPath, child.end, ); + const linkClassName = cn( + 'flex items-center', + { + 'mx-auto w-full gap-0! [&>svg]:flex-1': + !open, + }, + ); + + const spanClassName = cn( + 'w-auto transition-opacity duration-300', + { + 'w-0 opacity-0': !open, + }, + ); + return ( svg]:flex-1': - !open, - }, - )} + className={linkClassName} href={child.path} > {child.Icon} - + +