@@ -14,44 +14,6 @@ import logo from '@assets/logo-small.png';
1414import { Button } from "./ui/button" ;
1515import { HandHeart } from "lucide-react" ;
1616
17- const components : { title : string ; href : string ; description : string } [ ] = [
18- {
19- title : "Alert Dialog" ,
20- href : "/docs/primitives/alert-dialog" ,
21- description :
22- "A modal dialog that interrupts the user with important content and expects a response." ,
23- } ,
24- {
25- title : "Hover Card" ,
26- href : "/docs/primitives/hover-card" ,
27- description :
28- "For sighted users to preview content available behind a link." ,
29- } ,
30- {
31- title : "Progress" ,
32- href : "/docs/primitives/progress" ,
33- description :
34- "Displays an indicator showing the completion progress of a task, typically displayed as a progress bar." ,
35- } ,
36- {
37- title : "Scroll-area" ,
38- href : "/docs/primitives/scroll-area" ,
39- description : "Visually or semantically separates content." ,
40- } ,
41- {
42- title : "Tabs" ,
43- href : "/docs/primitives/tabs" ,
44- description :
45- "A set of layered sections of content—known as tab panels—that are displayed one at a time." ,
46- } ,
47- {
48- title : "Tooltip" ,
49- href : "/docs/primitives/tooltip" ,
50- description :
51- "A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it." ,
52- } ,
53- ]
54-
5517export const NavBar : React . FC = ( ) => {
5618 return (
5719 < header className = "bg-background sticky top-0 z-50 w-full" >
@@ -68,9 +30,10 @@ export const NavBar: React.FC = () => {
6830 < NavigationMenu >
6931 < NavigationMenuList >
7032 < NavigationMenuItem >
71- < NavigationMenuLink asChild className = { navigationMenuTriggerStyle ( ) } >
72- < a href = "https://www.communitydragon.org" > Home</ a >
73- </ NavigationMenuLink >
33+ < NavigationMenuLink
34+ className = { navigationMenuTriggerStyle ( ) }
35+ render = { < a href = "https://www.communitydragon.org" > Home</ a > }
36+ />
7437 </ NavigationMenuItem >
7538
7639 < NavigationMenuItem >
@@ -124,34 +87,23 @@ export const NavBar: React.FC = () => {
12487 </ ul >
12588 </ NavigationMenuContent >
12689 </ NavigationMenuItem >
127- { /* <NavigationMenuItem className="hidden md:flex">
128- <NavigationMenuTrigger>Components</NavigationMenuTrigger>
129- <NavigationMenuContent>
130- <ul className="grid w-[400px] gap-2 md:w-[500px] md:grid-cols-2 lg:w-[600px]">
131- {components.map((component) => (
132- <ListItem
133- key={component.title}
134- title={component.title}
135- href={component.href}
136- >
137- {component.description}
138- </ListItem>
139- ))}
140- </ul>
141- </NavigationMenuContent>
142- </NavigationMenuItem> */ }
14390 </ NavigationMenuList >
14491 </ NavigationMenu >
14592 </ div >
14693
14794 < NavigationMenu >
14895 < NavigationMenuList >
14996 < NavigationMenuItem >
150- < Button variant = "secondary" size = "sm" asChild >
151- < a href = "https://www.patreon.com/communitydragon" >
152- Support us < HandHeart />
153- </ a >
154- </ Button >
97+ < Button
98+ variant = "secondary"
99+ size = "sm"
100+ nativeButton = { false }
101+ render = {
102+ < a href = "https://www.patreon.com/communitydragon" >
103+ Support us < HandHeart />
104+ </ a >
105+ }
106+ />
155107 </ NavigationMenuItem >
156108 </ NavigationMenuList >
157109 </ NavigationMenu >
@@ -169,14 +121,10 @@ function ListItem({
169121} : React . ComponentPropsWithoutRef < "li" > & { href : string } ) {
170122 return (
171123 < li { ...props } >
172- < NavigationMenuLink asChild >
173- < a href = { href } >
174- < div className = "flex flex-col gap-1 text-sm" >
175- < div className = "leading-none font-medium" > { title } </ div >
176- < div className = "text-muted-foreground line-clamp-2" > { children } </ div >
177- </ div >
178- </ a >
179- </ NavigationMenuLink >
124+ < NavigationMenuLink render = { < a href = { href } > < div className = "flex flex-col gap-1 text-sm" >
125+ < div className = "leading-none font-medium" > { title } </ div >
126+ < div className = "text-muted-foreground line-clamp-2" > { children } </ div >
127+ </ div > </ a > } />
180128 </ li >
181129 )
182130}
0 commit comments