@@ -9,14 +9,20 @@ import {
99 DropdownMenuTrigger ,
1010} from "@/components/ui/dropdown-menu" ;
1111import clsx from "clsx" ;
12- import { ChevronDownIcon , Menu } from "lucide-react" ;
13- import Image from "next/image" ;
12+ import { ChevronDownIcon , Menu , TableOfContentsIcon } from "lucide-react" ;
1413import Link from "next/link" ;
1514import { usePathname } from "next/navigation" ;
1615import { useState } from "react" ;
1716import { GithubIcon } from "../components/Document/GithubButtonLink" ;
1817import { CustomAccordion } from "../components/others/CustomAccordion" ;
1918import { ThemeSwitcher } from "../components/others/theme/ThemeSwitcher" ;
19+ import {
20+ DotNetIcon ,
21+ ReactIcon ,
22+ TypeScriptIcon ,
23+ UnityIcon ,
24+ UnrealEngineIcon ,
25+ } from "../icons" ;
2026import { ThirdwebIcon } from "../icons/thirdweb" ;
2127
2228const links = [
@@ -65,42 +71,45 @@ const toolLinks = [
6571 } ,
6672] ;
6773
68- export const connectLinks = [
74+ export const connectLinks : Array < {
75+ name : string ;
76+ href : string ;
77+ icon : React . FC < { className ?: string } > ;
78+ } > = [
6979 {
7080 name : "Overview" ,
7181 href : "/connect" ,
72- icon : "/icons/navbar/nav-icon-dashboard.svg" ,
82+ icon : TableOfContentsIcon ,
7383 } ,
7484 {
7585 name : "TypeScript" ,
7686 href : "/typescript/v5" ,
77- icon : "/icons/navbar/nav-icon-typescript.svg" ,
87+ icon : TypeScriptIcon ,
7888 } ,
7989 {
8090 name : "React" ,
8191 href : "/react/v5" ,
82- icon : "/icons/navbar/nav-icon-react.svg" ,
92+ icon : ReactIcon ,
8393 } ,
8494 {
8595 name : "React Native" ,
8696 href : "/react-native/v5" ,
87- icon : "/icons/navbar/nav-icon-react.svg" ,
88- // icon: "/icons/navbar/nav-icon-react-native.svg",
97+ icon : ReactIcon ,
8998 } ,
9099 {
91100 name : ".NET" ,
92101 href : "/dotnet" ,
93- icon : "/icons/navbar/nav-icon-dotnet.svg" ,
102+ icon : DotNetIcon ,
94103 } ,
95104 {
96105 name : "Unity" ,
97106 href : "/unity" ,
98- icon : "/icons/navbar/nav-icon-unity.svg" ,
107+ icon : UnityIcon ,
99108 } ,
100109 {
101110 name : "Unreal Engine" ,
102111 href : "/unreal-engine" ,
103- icon : "/icons/navbar/nav-icon-unreal-engine.svg" ,
112+ icon : UnrealEngineIcon ,
104113 } ,
105114] as const ;
106115
@@ -123,7 +132,7 @@ export function Header() {
123132 const [ showBurgerMenu , setShowBurgerMenu ] = useState ( false ) ;
124133
125134 return (
126- < header className = "flex w-full items-center border-b bg-b-900 " >
135+ < header className = "flex w-full items-center border-b bg-background " >
127136 < div className = "container flex items-center justify-between gap-6 p-4 xl:justify-start" >
128137 < Link
129138 className = "flex items-center gap-2"
@@ -132,7 +141,7 @@ export function Header() {
132141 title = "thirdweb Docs"
133142 >
134143 < ThirdwebIcon className = "size-8" />
135- < span className = "font-bold text-[23px] text-f-100 leading-none tracking-tight" >
144+ < span className = "font-bold text-[23px] text-foreground leading-none tracking-tight" >
136145 Docs
137146 </ span >
138147 </ Link >
@@ -145,7 +154,7 @@ export function Header() {
145154 < Link
146155 href = "https://github.com/thirdweb-dev"
147156 target = "_blank"
148- className = "text-f-100 "
157+ className = "text-foreground "
149158 >
150159 < GithubIcon className = "mx-3 size-6" />
151160 </ Link >
@@ -164,7 +173,7 @@ export function Header() {
164173 className = { clsx (
165174 "grow gap-5" ,
166175 ! showBurgerMenu ? "hidden xl:flex" : "flex" ,
167- "fade-in-20 slide-in-from-top-3 fixed inset-0 top-sticky-top-height animate-in flex-col overflow-auto bg-b-800 p-6" ,
176+ "fade-in-20 slide-in-from-top-3 fixed inset-0 top-sticky-top-height animate-in flex-col overflow-auto bg-card p-6" ,
168177 "xl:static xl:animate-none xl:flex-row xl:justify-between xl:bg-transparent xl:p-0" ,
169178 ) }
170179 >
@@ -227,7 +236,7 @@ export function Header() {
227236 < Link
228237 href = "https://github.com/thirdweb-dev"
229238 target = "_blank"
230- className = "hidden text-f-300 transition-colors hover:text-f-100 xl:block"
239+ className = "hidden text-muted-foreground transition-colors hover:text-foreground xl:block"
231240 >
232241 < GithubIcon className = "mx-2 size-6" />
233242 </ Link >
@@ -241,7 +250,11 @@ export function Header() {
241250function DropdownLinks ( props : {
242251 onLinkClick ?: ( ) => void ;
243252 category : string ;
244- links : readonly { name : string ; href : string ; icon ?: string } [ ] ;
253+ links : readonly {
254+ name : string ;
255+ href : string ;
256+ icon ?: React . FC < { className ?: string } > ;
257+ } [ ] ;
245258} ) {
246259 return (
247260 < >
@@ -251,42 +264,40 @@ function DropdownLinks(props: {
251264 < DropdownMenuTrigger asChild >
252265 < Button
253266 variant = "ghost"
254- className = "inline-flex items-center gap-1 p-0 font-medium text-f-300 text-sm hover:bg-transparent hover:text-f-100 "
267+ className = "inline-flex items-center gap-1 p-0 font-medium text-muted-foreground text-sm hover:bg-transparent hover:text-foreground "
255268 >
256269 { props . category }
257- < ChevronDownIcon className = "size-4 text-f-300 opacity-70" />
270+ < ChevronDownIcon className = "size-4 text-muted-foreground opacity-70" />
258271 </ Button >
259272 </ DropdownMenuTrigger >
260273
261274 < DropdownMenuContent
262- className = "flex flex-col gap-1 bg-b-800 p-3"
275+ className = "flex flex-col gap-1 bg-card p-3"
263276 style = { {
264277 minWidth : "150px" ,
265278 } }
266279 >
267280 { props . links . map ( ( info ) => {
268281 return (
269282 < DropdownMenuItem asChild key = { info . name } >
270- < Link
271- href = { info . href }
272- target = { info . href . startsWith ( "http" ) ? "_blank" : "" }
273- prefetch = { false }
283+ < div
274284 className = { clsx (
275- "flex cursor-pointer font-medium text-f-200 " ,
276- "hover:bg-b-600 hover:text-f-100 " ,
285+ "relative flex cursor-pointer gap-2 font-medium text-foreground " ,
286+ "hover:bg-accent " ,
277287 ) }
278288 >
279289 { info . icon && (
280- < Image
281- src = { info . icon }
282- width = "20"
283- height = "20"
284- alt = ""
285- className = "mr-2"
286- />
290+ < info . icon className = "size-5 text-foreground" />
287291 ) }
288- { info . name }
289- </ Link >
292+ < Link
293+ prefetch = { false }
294+ target = { info . href . startsWith ( "http" ) ? "_blank" : "" }
295+ href = { info . href }
296+ className = "before:absolute before:inset-0"
297+ >
298+ { info . name }
299+ </ Link >
300+ </ div >
290301 </ DropdownMenuItem >
291302 ) ;
292303 } ) }
@@ -300,7 +311,7 @@ function DropdownLinks(props: {
300311 chevronPosition = "right"
301312 containerClassName = "border-none"
302313 trigger = { props . category }
303- triggerContainerClassName = "py-0 text-base font-medium text-f-300 "
314+ triggerContainerClassName = "py-0 text-base font-medium text-muted-foreground "
304315 >
305316 < div className = "pt-2" >
306317 < div className = "flex flex-col gap-4 border-l-2 pt-3 pl-4" >
@@ -327,7 +338,7 @@ function NavLink(props: {
327338 href : string ;
328339 name : string ;
329340 onClick ?: ( ) => void ;
330- icon ?: string ;
341+ icon ?: React . FC < { className ?: string } > ;
331342} ) {
332343 const pathname = usePathname ( ) ;
333344 return (
@@ -336,20 +347,14 @@ function NavLink(props: {
336347 onClick = { props . onClick }
337348 target = { props . href . startsWith ( "http" ) ? "_blank" : "" }
338349 className = { clsx (
339- "font-medium text-base transition-colors hover:text-f-100 xl:text-sm" ,
340- pathname === props . href ? "text-f-100 " : "text-f-300 " ,
341- props . icon ? "flex flex-row gap-2 " : "" ,
350+ "font-medium text-base transition-colors hover:text-foreground xl:text-sm" ,
351+ pathname === props . href ? "text-foreground " : "text-muted-foreground " ,
352+ props . icon ? "flex flex-row gap-3 " : "" ,
342353 ) }
343354 >
344355 { props . icon ? (
345356 < >
346- < Image
347- src = { props . icon }
348- width = "40"
349- height = "40"
350- className = "size-7"
351- alt = ""
352- />
357+ < props . icon className = "size-6 text-muted-foreground" />
353358 < span className = "my-auto" > { props . name } </ span >
354359 </ >
355360 ) : (
0 commit comments