File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -4,9 +4,11 @@ import clsx from "clsx"
44import type * as normalizePages from "nextra/normalize-pages"
55import React from "react"
66import { Anchor } from "../../app/conf/_design-system/anchor"
7- import { linkClasses } from "./navbar"
87import { usePathname } from "next/navigation"
98
9+ export const navLinkClasses =
10+ "typography-menu flex items-center text-neu-900 px-3 py-1 nextra-focus [text-box:trim-both_cap_alphabetic] leading-none hover:underline underline-offset-2"
11+
1012export interface NavLinkProps {
1113 href : string
1214 isActive : boolean
@@ -29,7 +31,7 @@ export function NavLink({
2931 < Anchor
3032 href = { href }
3133 className = { clsx (
32- linkClasses ,
34+ navLinkClasses ,
3335 "whitespace-nowrap max-md:hidden" ,
3436 isActive && ! page . newWindow && "underline" ,
3537 ) }
Original file line number Diff line number Diff line change @@ -16,16 +16,13 @@ import CloseIcon from "@/app/conf/_design-system/pixelarticons/close.svg?svgr"
1616import { GraphQLWordmarkLogo } from "../../icons"
1717import { ThemeSwitch } from "../theme-switch"
1818import { Flexsearch } from "../flexsearch"
19- import { NavLink } from "./nav-link"
19+ import { NavLink , navLinkClasses } from "./nav-link"
2020
2121type Item = normalizePages . PageItem | normalizePages . MenuItem
2222export interface NavBarProps {
2323 items : Item [ ]
2424}
2525
26- export const linkClasses =
27- "typography-menu flex items-center text-neu-900 px-3 py-1 nextra-focus [text-box:trim-both_cap_alphabetic] leading-none hover:underline underline-offset-2"
28-
2926function NavbarMenu ( {
3027 menu,
3128 children,
@@ -40,7 +37,7 @@ function NavbarMenu({
4037 < NavigationMenu . Item className = "max-md:hidden" >
4138 < NavigationMenu . Trigger
4239 className = { clsx (
43- linkClasses ,
40+ navLinkClasses ,
4441 "focus-visible:nextra-focusable flex items-center gap-1.5 whitespace-nowrap data-[popup-open]:underline max-md:hidden" ,
4542 ) }
4643 >
You can’t perform that action at this time.
0 commit comments