We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9f1ee33 + ddc7889 commit e2a0652Copy full SHA for e2a0652
packages/mdxui/src/components/DocsSidebar.tsx
@@ -0,0 +1,29 @@
1
+'use client'
2
+
3
+export interface DocsSection {
4
+ href: string
5
+ label: string
6
+}
7
8
+const DEFAULT_SECTIONS: DocsSection[] = [
9
+ { href: '/docs/introduction', label: 'Introduction' },
10
+ { href: '/docs/getting-started', label: 'Getting Started' },
11
+ { href: '/docs/api', label: 'API Reference' },
12
+ { href: '/docs/faq', label: 'FAQ' },
13
+]
14
15
+export function DocsSidebar({ sections = DEFAULT_SECTIONS }: { sections?: DocsSection[] }) {
16
+ return (
17
+ <aside>
18
+ <nav>
19
+ <ul>
20
+ {sections.map((s) => (
21
+ <li key={s.href}>
22
+ <a href={s.href}>{s.label}</a>
23
+ </li>
24
+ ))}
25
+ </ul>
26
+ </nav>
27
+ </aside>
28
+ )
29
0 commit comments