@@ -9,14 +9,21 @@ import {
99 DropdownMenuTrigger ,
1010} from "@/components/ui/dropdown-menu" ;
1111import clsx from "clsx" ;
12- import { ChevronDownIcon , Menu } from "lucide-react" ;
12+ import { ChevronDownIcon , Menu , TableOfContentsIcon } from "lucide-react" ;
1313import Image from "next/image" ;
1414import Link from "next/link" ;
1515import { usePathname } from "next/navigation" ;
1616import { useState } from "react" ;
1717import { GithubIcon } from "../components/Document/GithubButtonLink" ;
1818import { CustomAccordion } from "../components/others/CustomAccordion" ;
1919import { ThemeSwitcher } from "../components/others/theme/ThemeSwitcher" ;
20+ import {
21+ DotNetIcon ,
22+ ReactIcon ,
23+ TypeScriptIcon ,
24+ UnityIcon ,
25+ UnrealEngineIcon ,
26+ } from "../icons" ;
2027import { ThirdwebIcon } from "../icons/thirdweb" ;
2128
2229const links = [
@@ -65,42 +72,45 @@ const toolLinks = [
6572 } ,
6673] ;
6774
68- export const connectLinks = [
75+ export const connectLinks : Array < {
76+ name : string ;
77+ href : string ;
78+ icon : React . FC < { className ?: string } > ;
79+ } > = [
6980 {
7081 name : "Overview" ,
7182 href : "/connect" ,
72- icon : "/icons/navbar/nav-icon-dashboard.svg" ,
83+ icon : TableOfContentsIcon ,
7384 } ,
7485 {
7586 name : "TypeScript" ,
7687 href : "/typescript/v5" ,
77- icon : "/icons/navbar/nav-icon-typescript.svg" ,
88+ icon : TypeScriptIcon ,
7889 } ,
7990 {
8091 name : "React" ,
8192 href : "/react/v5" ,
82- icon : "/icons/navbar/nav-icon-react.svg" ,
93+ icon : ReactIcon ,
8394 } ,
8495 {
8596 name : "React Native" ,
8697 href : "/react-native/v5" ,
87- icon : "/icons/navbar/nav-icon-react.svg" ,
88- // icon: "/icons/navbar/nav-icon-react-native.svg",
98+ icon : ReactIcon ,
8999 } ,
90100 {
91101 name : ".NET" ,
92102 href : "/dotnet" ,
93- icon : "/icons/navbar/nav-icon-dotnet.svg" ,
103+ icon : DotNetIcon ,
94104 } ,
95105 {
96106 name : "Unity" ,
97107 href : "/unity" ,
98- icon : "/icons/navbar/nav-icon-unity.svg" ,
108+ icon : UnityIcon ,
99109 } ,
100110 {
101111 name : "Unreal Engine" ,
102112 href : "/unreal-engine" ,
103- icon : "/icons/navbar/nav-icon-unreal-engine.svg" ,
113+ icon : UnrealEngineIcon ,
104114 } ,
105115] as const ;
106116
@@ -123,7 +133,7 @@ export function Header() {
123133 const [ showBurgerMenu , setShowBurgerMenu ] = useState ( false ) ;
124134
125135 return (
126- < header className = "flex w-full items-center border-b bg-b-900 " >
136+ < header className = "flex w-full items-center border-b bg-background " >
127137 < div className = "container flex items-center justify-between gap-6 p-4 xl:justify-start" >
128138 < Link
129139 className = "flex items-center gap-2"
@@ -132,7 +142,7 @@ export function Header() {
132142 title = "thirdweb Docs"
133143 >
134144 < ThirdwebIcon className = "size-8" />
135- < span className = "font-bold text-[23px] text-f-100 leading-none tracking-tight" >
145+ < span className = "font-bold text-[23px] text-foreground leading-none tracking-tight" >
136146 Docs
137147 </ span >
138148 </ Link >
@@ -145,7 +155,7 @@ export function Header() {
145155 < Link
146156 href = "https://github.com/thirdweb-dev"
147157 target = "_blank"
148- className = "text-f-100 "
158+ className = "text-foreground "
149159 >
150160 < GithubIcon className = "mx-3 size-6" />
151161 </ Link >
@@ -164,7 +174,7 @@ export function Header() {
164174 className = { clsx (
165175 "grow gap-5" ,
166176 ! 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" ,
177+ "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" ,
168178 "xl:static xl:animate-none xl:flex-row xl:justify-between xl:bg-transparent xl:p-0" ,
169179 ) }
170180 >
@@ -227,7 +237,7 @@ export function Header() {
227237 < Link
228238 href = "https://github.com/thirdweb-dev"
229239 target = "_blank"
230- className = "hidden text-f-300 transition-colors hover:text-f-100 xl:block"
240+ className = "hidden text-muted-foreground transition-colors hover:text-foreground xl:block"
231241 >
232242 < GithubIcon className = "mx-2 size-6" />
233243 </ Link >
@@ -241,7 +251,11 @@ export function Header() {
241251function DropdownLinks ( props : {
242252 onLinkClick ?: ( ) => void ;
243253 category : string ;
244- links : readonly { name : string ; href : string ; icon ?: string } [ ] ;
254+ links : readonly {
255+ name : string ;
256+ href : string ;
257+ icon ?: React . FC < { className ?: string } > ;
258+ } [ ] ;
245259} ) {
246260 return (
247261 < >
@@ -251,42 +265,40 @@ function DropdownLinks(props: {
251265 < DropdownMenuTrigger asChild >
252266 < Button
253267 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 "
268+ className = "inline-flex items-center gap-1 p-0 font-medium text-muted-foreground text-sm hover:bg-transparent hover:text-foreground "
255269 >
256270 { props . category }
257- < ChevronDownIcon className = "size-4 text-f-300 opacity-70" />
271+ < ChevronDownIcon className = "size-4 text-muted-foreground opacity-70" />
258272 </ Button >
259273 </ DropdownMenuTrigger >
260274
261275 < DropdownMenuContent
262- className = "flex flex-col gap-1 bg-b-800 p-3"
276+ className = "flex flex-col gap-1 bg-card p-3"
263277 style = { {
264278 minWidth : "150px" ,
265279 } }
266280 >
267281 { props . links . map ( ( info ) => {
268282 return (
269283 < DropdownMenuItem asChild key = { info . name } >
270- < Link
271- href = { info . href }
272- target = { info . href . startsWith ( "http" ) ? "_blank" : "" }
273- prefetch = { false }
284+ < div
274285 className = { clsx (
275- "flex cursor-pointer font-medium text-f-200 " ,
276- "hover:bg-b-600 hover:text-f-100 " ,
286+ "relative flex cursor-pointer gap-2 font-medium text-foreground " ,
287+ "hover:bg-accent " ,
277288 ) }
278289 >
279290 { info . icon && (
280- < Image
281- src = { info . icon }
282- width = "20"
283- height = "20"
284- alt = ""
285- className = "mr-2"
286- />
291+ < info . icon className = "size-5 text-foreground" />
287292 ) }
288- { info . name }
289- </ Link >
293+ < Link
294+ prefetch = { false }
295+ target = { info . href . startsWith ( "http" ) ? "_blank" : "" }
296+ href = { info . href }
297+ className = "before:absolute before:inset-0"
298+ >
299+ { info . name }
300+ </ Link >
301+ </ div >
290302 </ DropdownMenuItem >
291303 ) ;
292304 } ) }
@@ -300,7 +312,7 @@ function DropdownLinks(props: {
300312 chevronPosition = "right"
301313 containerClassName = "border-none"
302314 trigger = { props . category }
303- triggerContainerClassName = "py-0 text-base font-medium text-f-300 "
315+ triggerContainerClassName = "py-0 text-base font-medium text-muted-foreground "
304316 >
305317 < div className = "pt-2" >
306318 < div className = "flex flex-col gap-4 border-l-2 pt-3 pl-4" >
@@ -336,8 +348,8 @@ function NavLink(props: {
336348 onClick = { props . onClick }
337349 target = { props . href . startsWith ( "http" ) ? "_blank" : "" }
338350 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 " ,
351+ "font-medium text-base transition-colors hover:text-foreground xl:text-sm" ,
352+ pathname === props . href ? "text-foreground " : "text-muted-foreground " ,
341353 props . icon ? "flex flex-row gap-2" : "" ,
342354 ) }
343355 >
0 commit comments