-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmdx-components.tsx
More file actions
18 lines (18 loc) · 703 Bytes
/
mdx-components.tsx
File metadata and controls
18 lines (18 loc) · 703 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { APIPage } from "fumadocs-openapi/ui";
import defaultMdxComponents from "fumadocs-ui/mdx";
import type { MDXComponents } from "mdx/types";
import { openapi } from "./lib/source";
import { Card } from "./components/card";
import { Collapsible } from "./components/collapsible";
import { VideoPreview } from "./components/video-preview";
// use this function to get MDX components, you will need it for rendering MDX
export function getMDXComponents(components?: MDXComponents): MDXComponents {
return {
...defaultMdxComponents,
APIPage: (props) => <APIPage {...openapi.getAPIPageProps(props)} />,
...components,
Card,
Collapsible,
VideoPreview,
};
}