+ {title || description ? (
+
+ {title ?
{title}
: null}
+ {description ? (
+
{description}
+ ) : null}
+
+ ) : null}
+ {children ?
{children}
: null}
+
+ {filename ?
{filename}
: null}
+
+ {code}
+
+
+ {sourceFiles.length > 0 ? (
+
+ {sourceFiles.map((sourceFile) => (
+
+
{sourceFile.filename}
+
+ {sourceFile.code}
+
+
+ ))}
+
+ ) : null}
+
+ );
+}
diff --git a/packages/docs/src/components/index.ts b/packages/docs/src/components/index.ts
index b255a77..fe5f3d9 100644
--- a/packages/docs/src/components/index.ts
+++ b/packages/docs/src/components/index.ts
@@ -1,5 +1,11 @@
/** @biome-ignore lint/performance/noBarrelFile: package entry point */
+export {
+ Accordion,
+ AccordionItem,
+ type AccordionItemProps,
+ type AccordionProps,
+} from "./accordion";
export {
Callout,
type CalloutProps,
@@ -12,6 +18,7 @@ export {
type CommandTabsProps,
type PackageManager,
} from "./command-tabs";
+export { Example, type ExampleProps, type ExampleSourceFile } from "./example";
export {
type MdxComponents,
mdxComponents,
@@ -24,6 +31,11 @@ export {
} from "./selector";
export { Step, type StepProps, Steps, type StepsProps } from "./steps";
export { Tab, type TabProps, Tabs, type TabsProps } from "./tabs";
+export {
+ TopicSwitcher,
+ type TopicSwitcherItem,
+ type TopicSwitcherProps,
+} from "./topic-switcher";
export {
ExtractedTypeTable,
type ExtractedTypeTableProps,
diff --git a/packages/docs/src/components/mdx-components.ts b/packages/docs/src/components/mdx-components.ts
index 4023024..552f07a 100644
--- a/packages/docs/src/components/mdx-components.ts
+++ b/packages/docs/src/components/mdx-components.ts
@@ -1,10 +1,13 @@
+import { Accordion, AccordionItem } from "./accordion";
import { Callout } from "./callout";
import { Card, Cards } from "./card";
import { CommandTabs } from "./command-tabs";
+import { Example } from "./example";
import { Mermaid } from "./mermaid";
import { Selector } from "./selector";
import { Step, Steps } from "./steps";
import { Tab, Tabs } from "./tabs";
+import { TopicSwitcher } from "./topic-switcher";
import { ExtractedTypeTable, TypeTable } from "./type-table";
/**
@@ -18,10 +21,13 @@ import { ExtractedTypeTable, TypeTable } from "./type-table";
* const components = { ...mdxComponents, Callout: MyCallout };
*/
export const mdxComponents = {
+ Accordion,
+ AccordionItem,
ExtractedTypeTable,
Callout,
Card,
Cards,
+ Example,
Mermaid,
CommandTabs,
Selector,
@@ -29,6 +35,7 @@ export const mdxComponents = {
Steps,
Tab,
Tabs,
+ TopicSwitcher,
TypeTable,
} as const;
diff --git a/packages/docs/src/components/topic-switcher.tsx b/packages/docs/src/components/topic-switcher.tsx
new file mode 100644
index 0000000..1d5d8ad
--- /dev/null
+++ b/packages/docs/src/components/topic-switcher.tsx
@@ -0,0 +1,60 @@
+import type { AnchorHTMLAttributes, HTMLAttributes } from "react";
+
+export type TopicSwitcherItem = AnchorHTMLAttributes