1- import cn from "clsx"
1+ // eslint-disable-next-line no-restricted-imports -- since we don't need newWindow prop
22import NextLink from "next/link"
3- import { ArrowRightIcon } from "nextra/icons"
43import type { Item } from "nextra/normalize-pages"
54import type { ReactElement } from "react"
65import { useThemeConfig } from "nextra-theme-docs"
76import type { DocsThemeConfig } from "nextra-theme-docs"
87
8+ import { ArrowDown } from "@/app/conf/_design-system/pixelarticons/arrow-down"
9+
910interface NavLinkProps {
1011 currentIndex : number
1112 flatDocsDirectories : Item [ ]
1213}
1314
14- const classes = {
15- link : cn (
16- "nextra-focus _text-gray-600 dark:_text-gray-400" ,
17- "hover:_text-gray-800 dark:hover:_text-gray-200" ,
18- "contrast-more:_text-gray-700 contrast-more:dark:_text-gray-100" ,
19- "_flex _max-w-[50%] _items-center _gap-1 _py-4 _text-base _font-medium _transition-colors [word-break:break-word] md:_text-lg" ,
20- ) ,
21- icon : cn ( "_inline _h-5 _shrink-0" ) ,
22- }
23-
2415export function ArrowNavLinks ( {
2516 flatDocsDirectories,
2617 currentIndex,
@@ -38,34 +29,29 @@ export function ArrowNavLinks({
3829 if ( ! prev && ! next ) return null
3930
4031 return (
41- < div
42- className = { cn (
43- "_mb-8 _flex _items-center _border-t _pt-8 dark:_border-neutral-800" ,
44- "contrast-more:_border-neutral-400 dark:contrast-more:_border-neutral-400" ,
45- "print:_hidden" ,
46- ) }
47- >
32+ < div className = "mb-8 flex items-center gap-4 border-t border-neu-200 pt-8 print:hidden" >
4833 { prev && (
4934 < NextLink
5035 href = { prev . route }
5136 title = { prev . title }
52- className = { cn ( classes . link , "ltr:_pr-4 rtl:_pl-4" ) }
37+ className = "gql-focus-visible typography- link flex max-w-[50%] items-center gap-2 border border-neu-200 pr-2 text-left text-base no-underline hover:bg-neu-50 hover:ring hover:ring-neu-100 dark:border-neu-100 dark:hover:bg-neu-50/50 dark:hover:ring-neu-50"
5338 >
54- < ArrowRightIcon className = { cn ( classes . icon , "ltr:_rotate-180" ) } />
55- { prev . title }
39+ < span className = "border-r p-2" >
40+ < ArrowDown className = "size-8 shrink-0 rotate-90" />
41+ </ span >
42+ < span className = "[word-break:break-word]" > { prev . title } </ span >
5643 </ NextLink >
5744 ) }
5845 { next && (
5946 < NextLink
6047 href = { next . route }
6148 title = { next . title }
62- className = { cn (
63- classes . link ,
64- "ltr:_ml-auto ltr:_pl-4 ltr:_text-right rtl:_mr-auto rtl:_pr-4 rtl:_text-left" ,
65- ) }
49+ className = "gql-focus-visible typography-link ml-auto flex max-w-[50%] items-center gap-2 border border-neu-200 pl-2 text-left text-base no-underline hover:bg-neu-50 hover:ring hover:ring-neu-100 dark:border-neu-100 dark:hover:bg-neu-50/50 dark:hover:ring-neu-50"
6650 >
67- { next . title }
68- < ArrowRightIcon className = { cn ( classes . icon , "rtl:_rotate-180" ) } />
51+ < span className = "[word-break:break-word]" > { next . title } </ span >
52+ < span className = "border-l border-neu-200 p-2 dark:border-neu-100" >
53+ < ArrowDown className = "size-8 shrink-0 -rotate-90" />
54+ </ span >
6955 </ NextLink >
7056 ) }
7157 </ div >
0 commit comments