@@ -3,13 +3,7 @@ import { Icon } from '@/components/icon';
3
3
import { Avatar , AvatarFallback , AvatarImage } from '@/components/ui/avatar' ;
4
4
import { Button } from '@/components/ui/button' ;
5
5
import { DropdownMenu , DropdownMenuContent , DropdownMenuTrigger } from '@/components/ui/dropdown-menu' ;
6
- import {
7
- NavigationMenu ,
8
- NavigationMenuItem ,
9
- NavigationMenuLink ,
10
- NavigationMenuList ,
11
- navigationMenuTriggerStyle ,
12
- } from '@/components/ui/navigation-menu' ;
6
+ import { NavigationMenu , NavigationMenuItem , NavigationMenuList , navigationMenuTriggerStyle } from '@/components/ui/navigation-menu' ;
13
7
import { Sheet , SheetContent , SheetHeader , SheetTitle , SheetTrigger } from '@/components/ui/sheet' ;
14
8
import { Tooltip , TooltipContent , TooltipProvider , TooltipTrigger } from '@/components/ui/tooltip' ;
15
9
import { UserMenuContent } from '@/components/user-menu-content' ;
@@ -109,13 +103,12 @@ export function AppHeader({ breadcrumbs = [] }: AppHeaderProps) {
109
103
< NavigationMenuList className = "flex h-full items-stretch space-x-2" >
110
104
{ mainNavItems . map ( ( item , index ) => (
111
105
< NavigationMenuItem key = { index } className = "relative flex h-full items-center" >
112
- < Link href = { item . url } >
113
- < NavigationMenuLink
114
- className = { cn ( navigationMenuTriggerStyle ( ) , activeItemStyles , 'h-9 cursor-pointer px-3' ) }
115
- >
116
- { item . icon && < Icon iconNode = { item . icon } className = "mr-2 h-4 w-4" /> }
117
- { item . title }
118
- </ NavigationMenuLink >
106
+ < Link
107
+ href = { item . url }
108
+ className = { cn ( navigationMenuTriggerStyle ( ) , activeItemStyles , 'h-9 cursor-pointer px-3' ) }
109
+ >
110
+ { item . icon && < Icon iconNode = { item . icon } className = "mr-2 h-4 w-4" /> }
111
+ { item . title }
119
112
</ Link >
120
113
< div className = "absolute bottom-0 left-0 h-0.5 w-full translate-y-px bg-black dark:bg-white" > </ div >
121
114
</ NavigationMenuItem >
@@ -126,20 +119,25 @@ export function AppHeader({ breadcrumbs = [] }: AppHeaderProps) {
126
119
127
120
< div className = "ml-auto flex items-center space-x-2" >
128
121
< div className = "relative flex items-center space-x-1" >
129
- < Button variant = "ghost" size = "icon" className = "h-9 w-9 cursor-pointer" >
130
- < Search className = "h-5 w-5" />
122
+ < Button variant = "ghost" size = "icon" className = "group h-9 w-9 cursor-pointer" >
123
+ < Search className = "h-5 w-5 opacity-80 group-hover:opacity-100 " />
131
124
</ Button >
132
125
< div className = "hidden space-x-1 lg:flex" >
133
126
{ rightNavItems . map ( ( item ) => (
134
- < TooltipProvider delayDuration = { 0 } >
127
+ < TooltipProvider key = { item . title } delayDuration = { 0 } >
135
128
< Tooltip >
136
129
< TooltipTrigger >
137
- < Button key = { item . title } variant = "ghost" size = "icon" asChild className = "h-9 w-9 cursor-pointer" >
138
- < a href = { item . url } target = "_blank" rel = "noopener noreferrer" >
139
- < span className = "sr-only" > { item . title } </ span >
140
- { item . icon && < Icon iconNode = { item . icon } className = "h-5 w-5" /> }
141
- </ a >
142
- </ Button >
130
+ < a
131
+ href = { item . url }
132
+ target = "_blank"
133
+ rel = "noopener noreferrer"
134
+ className = "group inline-flex h-9 w-9 items-center justify-center rounded-md bg-transparent p-0 text-sm font-medium text-accent-foreground ring-offset-background transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"
135
+ >
136
+ < span className = "sr-only" > { item . title } </ span >
137
+ { item . icon && (
138
+ < Icon iconNode = { item . icon } className = "h-4 w-4 opacity-80 group-hover:opacity-100" />
139
+ ) }
140
+ </ a >
143
141
</ TooltipTrigger >
144
142
< TooltipContent >
145
143
< p > { item . title } </ p >
0 commit comments