-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathmdx-components.tsx
More file actions
36 lines (35 loc) · 1.1 KB
/
mdx-components.tsx
File metadata and controls
36 lines (35 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { CodeBlock, Pre } from "fumadocs-ui/components/codeblock";
import { File, Files, Folder } from "fumadocs-ui/components/files";
import { Tab, Tabs } from "fumadocs-ui/components/tabs";
import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
import { TypeTable } from "fumadocs-ui/components/type-table";
import { Step, Steps } from "fumadocs-ui/components/steps";
import defaultMdxComponents from "fumadocs-ui/mdx";
import type { MDXComponents } from "mdx/types";
import * as icons from "lucide-react";
import * as docsComponents from "@/components/docs";
import * as murphyComponents from "@/components/ui/murphy";
export function getMDXComponents(components?: MDXComponents): MDXComponents {
return {
...(icons as unknown as MDXComponents),
...defaultMdxComponents,
File,
Files,
Folder,
Tabs,
Tab,
TypeTable,
Step,
Steps,
Accordion,
Accordions,
pre: ({ ref: _ref, ...props }) => (
<CodeBlock {...props}>
<Pre>{props.children}</Pre>
</CodeBlock>
),
...components,
...docsComponents,
...murphyComponents,
};
}