MCPcopy Create free account
hub / github.com/nodejs/nodejs.org / NavItem

Function NavItem

packages/ui-components/src/Containers/NavBar/NavItem/index.tsx:23–43  ·  view source on GitHub ↗
({
  href = '',
  type = 'nav',
  children,
  className,
  target,
  ...props
})

Source from the content-addressed store, hash-verified

21};
22
23const NavItem: FC<PropsWithChildren<NavItemProps>> = ({
24 href = '',
25 type = 'nav',
26 children,
27 className,
28 target,
29 ...props
30}) => (
31 <BaseActiveLink
32 target={target}
33 href={href}
34 className={classNames(styles.navItem, styles[type], className)}
35 activeClassName={styles.active}
36 allowSubPath={href.startsWith('/')}
37 {...props}
38 >
39 <span className={styles.label}>{children}</span>
40
41 {target === '_blank' && <ArrowUpRightIcon className={styles.icon} />}
42 </BaseActiveLink>
43);
44
45export default NavItem;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected