Skip to content

Commit faee7fc

Browse files
alittlerCopilot
andcommitted
Make dropdown nav horizontal with larger icons
- Changed dropdown menu from vertical (w-24, max-h-96) to horizontal flex layout - Removed section dividers (space-y-1, mb-3) for compact horizontal arrangement - Changed container to flex flex-wrap with gap-1 and max-w-xs - Increased icon size from 18 to 36 for better visibility - Reduced button padding from p-2 to p-1 to keep horizontal fit tight - All buttons now fit horizontally on one or two lines Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent dd41e52 commit faee7fc

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎src/components/Layout/Sidebar.tsx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,10 @@ export const Sidebar: React.FC<SidebarProps> = ({
221221
>
222222
<Layout size={20} />
223223
</button>
224-
{isMenuOpen && (
225-
<div className="absolute left-full top-0 ml-2 bg-slate-900 border border-slate-800 rounded-2xl shadow-2xl z-50 w-24 max-h-96 overflow-y-auto p-2 custom-scrollbar">
224+
{isMenuOpen && (
225+
<div className="absolute left-full top-0 ml-2 bg-slate-900 border border-slate-800 rounded-2xl shadow-2xl z-50 flex flex-wrap gap-1 p-2 custom-scrollbar max-w-xs">
226226
{sections.map((section) => (
227-
<div key={section.title} className="space-y-1 mb-3 last:mb-0">
227+
<div key={section.title} className="flex gap-1">
228228
{section.items.map(item => {
229229
const isActive = currentView === item.id;
230230
const isDisabled = item.projectOnly && !hasActiveProject;
@@ -234,15 +234,15 @@ export const Sidebar: React.FC<SidebarProps> = ({
234234
title={item.label}
235235
onClick={() => handleNavItemClick(item)}
236236
disabled={isDisabled}
237-
className={`w-full flex items-center justify-center p-2 rounded-xl transition-all group ${
237+
className={`flex items-center justify-center p-1 rounded-xl transition-all group ${
238238
isActive ? 'bg-indigo-600 text-white shadow-lg shadow-indigo-600/20' : ''
239239
} ${
240240
!isActive && !isDisabled ? 'hover:bg-slate-800 hover:text-slate-200' : ''
241241
} ${
242242
isDisabled ? 'opacity-40 cursor-not-allowed grayscale' : ''
243243
}`}
244244
>
245-
<item.icon size={18} className={`${isActive ? 'text-white' : 'text-slate-500 group-hover:text-amber-500'} transition-colors`} />
245+
<item.icon size={36} className={`${isActive ? 'text-white' : 'text-slate-500 group-hover:text-amber-500'} transition-colors`} />
246246
</button>
247247
);
248248
})}

0 commit comments

Comments
 (0)