@@ -23,6 +23,7 @@ import {
2323 More03Icon ,
2424} from '@hugeicons/core-free-icons'
2525import { CreateTaskModal } from '@/components/kanban/create-task-modal'
26+ import { cn } from '@/lib/utils'
2627
2728interface HeaderProps {
2829 onNewTaskRef ?: ( openModal : ( ) => void ) => void
@@ -86,20 +87,25 @@ export function Header({ onNewTaskRef, onOpenCommandPalette }: HeaderProps) {
8687 { NAV_ITEMS . map ( ( item ) => {
8788 const active = isActive ( item . to , item . matchPrefix )
8889 return (
89- < Link key = { item . to } to = { item . to } >
90- < Button
91- variant = { active ? 'secondary' : 'ghost' }
92- size = "sm"
93- className = { active ? 'dark:bg-transparent text-destructive' : undefined }
94- >
95- < HugeiconsIcon
96- icon = { item . icon }
97- size = { 16 }
98- strokeWidth = { 2 }
99- data-slot = "icon"
100- />
101- { t ( item . labelKey ) }
102- </ Button >
90+ < Link
91+ key = { item . to }
92+ to = { item . to }
93+ className = { cn (
94+ 'relative flex items-center gap-1.5 rounded-md px-2 py-1 text-sm font-medium transition-colors' ,
95+ active
96+ ? 'bg-background text-foreground'
97+ : 'text-foreground/60 hover:text-foreground' ,
98+ 'after:absolute after:inset-x-0 after:bottom-0 after:h-0.5 after:bg-foreground after:transition-opacity' ,
99+ active ? 'after:opacity-100' : 'after:opacity-0'
100+ ) }
101+ >
102+ < HugeiconsIcon
103+ icon = { item . icon }
104+ size = { 16 }
105+ strokeWidth = { 2 }
106+ data-slot = "icon"
107+ />
108+ { t ( item . labelKey ) }
103109 </ Link >
104110 )
105111 } ) }
@@ -116,14 +122,18 @@ export function Header({ onNewTaskRef, onOpenCommandPalette }: HeaderProps) {
116122 >
117123 < HugeiconsIcon icon = { BrowserIcon } size = { 16 } strokeWidth = { 2 } />
118124 </ Button >
119- < Link to = "/settings" >
120- < Button
121- variant = { pathname === '/settings' ? 'secondary' : 'ghost' }
122- size = "icon-sm"
123- className = { pathname === '/settings' ? 'dark:bg-transparent text-destructive' : undefined }
124- >
125- < HugeiconsIcon icon = { Settings01Icon } size = { 16 } strokeWidth = { 2 } />
126- </ Button >
125+ < Link
126+ to = "/settings"
127+ className = { cn (
128+ 'relative flex items-center justify-center rounded-md p-1.5 transition-colors' ,
129+ pathname === '/settings'
130+ ? 'bg-background text-foreground'
131+ : 'text-foreground/60 hover:text-foreground' ,
132+ 'after:absolute after:inset-x-0 after:bottom-0 after:h-0.5 after:bg-foreground after:transition-opacity' ,
133+ pathname === '/settings' ? 'after:opacity-100' : 'after:opacity-0'
134+ ) }
135+ >
136+ < HugeiconsIcon icon = { Settings01Icon } size = { 16 } strokeWidth = { 2 } />
127137 </ Link >
128138 </ div >
129139 </ header >
0 commit comments