Skip to content

Commit 84916f7

Browse files
committed
Refactor Menu Item to fix multi-line wrapping and spacing
1 parent e4e87ab commit 84916f7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

application/src/components/dashboard/sidebar/MenuItem.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ export const MenuItem: React.FC<MenuItemProps> = ({
3939
}
4040
};
4141
const isActive = path && location.pathname === path;
42-
const mainIconSize = "h-6 w-6";
42+
const mainIconSize = "h-5 w-5";
4343
return <div className={`
44-
${collapsed ? 'p-3' : 'p-2 pl-3'}
44+
${collapsed ? 'p-3' : 'py-3 px-3'}
4545
mb-1 rounded-lg
4646
${isActive ? theme === 'dark' ? 'bg-gray-800' : 'bg-sidebar-accent' : `hover:${theme === 'dark' ? 'bg-gray-800' : 'bg-sidebar-accent'}`}
47-
flex items-center
47+
flex items-center gap-3
4848
${collapsed ? 'justify-center' : ''}
49-
cursor-pointer
49+
cursor-pointer transition-colors
5050
`} onClick={handleClick}>
51-
<Icon className={`${mainIconSize} ${color}`} />
52-
{!collapsed && <span className="ml-2.5 text-foreground tracking-wide text-[15px] font-normal">
51+
<Icon className={`${mainIconSize} flex-shrink-0 ${theme === 'dark' ? 'text-gray-400' : 'text-muted-foreground'}`} />
52+
{!collapsed && <span className="text-sidebar-foreground font-inter text-[14px] font-medium tracking-tight leading-tight whitespace-nowrap">
5353
{t(translationKey)}
5454
</span>}
5555
</div>;

0 commit comments

Comments
 (0)