'use client' import React from 'react' import { cn } from '../../../../../utils' import { type NavItem } from '../../config' import { LevelStateContext } from '../../context' import styles from '../../styles.module.css' type Props = { entry: NavItem showIcon?: boolean after?: React.ReactNode } export function NavLabel({ entry, showIcon, after }: Props) { const { navHighlight } = React.useContext(LevelStateContext) const isHighlighted = navHighlight?.[0] === entry.label const { label, Icon } = entry return (
{showIcon && Icon && ( )} {label} {after && {after}}
) }