@@ -4,7 +4,7 @@ import Hamburger from '@heroicons/react/24/solid/Bars3Icon';
4
4
import XMark from '@heroicons/react/24/solid/XMarkIcon' ;
5
5
import * as Label from '@radix-ui/react-label' ;
6
6
import { useState } from 'react' ;
7
- import type { FC , ComponentProps } from 'react' ;
7
+ import type { FC , ComponentProps , HTMLAttributeAnchorTarget } from 'react' ;
8
8
9
9
import LanguageDropdown from '@/components/Common/LanguageDropDown' ;
10
10
import { SearchButton } from '@/components/Common/Search' ;
@@ -24,7 +24,11 @@ const navInteractionIcons = {
24
24
} ;
25
25
26
26
type NavbarProps = {
27
- navItems : Array < { text : FormattedMessage ; link : string } > ;
27
+ navItems : Array < {
28
+ text : FormattedMessage ;
29
+ link : string ;
30
+ target ?: HTMLAttributeAnchorTarget | undefined ;
31
+ } > ;
28
32
languages : ComponentProps < typeof LanguageDropdown > ;
29
33
onThemeTogglerClick : ( ) => void ;
30
34
} ;
@@ -57,8 +61,8 @@ const NavBar: FC<NavbarProps> = ({
57
61
58
62
< div className = { `${ style . main } peer-checked:flex` } >
59
63
< div className = { style . navItems } >
60
- { navItems . map ( ( { text, link } ) => (
61
- < NavItem key = { link } href = { link } >
64
+ { navItems . map ( ( { text, link, target } ) => (
65
+ < NavItem key = { link } href = { link } target = { target } >
62
66
{ text }
63
67
</ NavItem >
64
68
) ) }
0 commit comments