({
href,
children,
tag,
active = false,
isAnchorLink = false,
}: {
href: string
children: React.ReactNode
tag?: string
active?: boolean
isAnchorLink?: boolean
})
| 33 | } |
| 34 | |
| 35 | function NavLink({ |
| 36 | href, |
| 37 | children, |
| 38 | tag, |
| 39 | active = false, |
| 40 | isAnchorLink = false, |
| 41 | }: { |
| 42 | href: string |
| 43 | children: React.ReactNode |
| 44 | tag?: string |
| 45 | active?: boolean |
| 46 | isAnchorLink?: boolean |
| 47 | }) { |
| 48 | return ( |
| 49 | <Link |
| 50 | href={href} |
| 51 | aria-current={active ? 'page' : undefined} |
| 52 | className={clsx( |
| 53 | 'flex justify-between gap-2 py-1 pr-3 text-sm transition', |
| 54 | isAnchorLink ? 'pl-7' : 'pl-4', |
| 55 | active |
| 56 | ? 'text-gray-900 dark:text-white' |
| 57 | : 'text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white', |
| 58 | )} |
| 59 | > |
| 60 | <span className="truncate">{children}</span> |
| 61 | {tag && <Tag>{tag}</Tag>} |
| 62 | </Link> |
| 63 | ) |
| 64 | } |
| 65 | |
| 66 | function VisibleSectionHighlight({ |
| 67 | group, |
nothing calls this directly
no outgoing calls
no test coverage detected