You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Docstrings generation was requested by @itasimo.
* #57 (comment)
The following files were modified:
* `src/components/glass.tsx`
* `src/components/header.tsx`
* `src/components/ui/navigation-menu.tsx`
* Render the responsive header that switches between mobile and desktop layouts.
273
+
*
274
+
* While the app hydrates, the component renders the mobile layout by default to avoid a layout flash;
275
+
* after mount it selects mobile or desktop based on the "(max-width: 768px)" media query.
276
+
*
277
+
* @returns A React element for the header: initially the mobile layout until hydration completes, then the mobile layout when the viewport is 768px wide or narrower, otherwise the desktop layout.
* Renders a styled navigation menu trigger with a chevron icon.
68
+
*
69
+
* Renders a NavigationMenuPrimitive.Trigger element with preset styling, a `data-slot="navigation-menu-trigger"` attribute, and a down-pointing chevron that rotates when the trigger is open.
70
+
*
71
+
* @returns The rendered trigger element for the navigation menu.
72
+
*/
49
73
functionNavigationMenuTrigger({
50
74
className,
51
75
children,
@@ -67,6 +91,12 @@ function NavigationMenuTrigger({
67
91
)
68
92
}
69
93
94
+
/**
95
+
* Wraps Radix's `NavigationMenuPrimitive.Content`, applying layout, animation, and theme-related classes and forwarding all props.
96
+
*
97
+
* @param props - Props passed to the underlying `NavigationMenuPrimitive.Content`. The `className` prop, if provided, is merged with the component's internal classes.
98
+
* @returns A `NavigationMenuPrimitive.Content` element with a `data-slot="navigation-menu-content"` attribute, merged classes, and forwarded props.
@@ -81,6 +111,11 @@ function NavigationMenuContent({ className, ...props }: React.ComponentProps<typ
81
111
)
82
112
}
83
113
114
+
/**
115
+
* Renders a centered, absolutely positioned container that hosts the NavigationMenu viewport.
116
+
*
117
+
* @returns A React element containing the Radix NavigationMenu viewport wrapped in an absolutely positioned, centered container.
118
+
*/
84
119
functionNavigationMenuViewport({
85
120
className,
86
121
...props
@@ -99,6 +134,11 @@ function NavigationMenuViewport({
99
134
)
100
135
}
101
136
137
+
/**
138
+
* Render a styled NavigationMenu link element with a consistent `data-slot` and utility classes.
139
+
*
140
+
* @returns A `NavigationMenuPrimitive.Link` element with base layout, typography, and state-aware styling; additional props are forwarded to the underlying element.
0 commit comments