-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmdx-components.tsx
More file actions
51 lines (50 loc) · 1.52 KB
/
mdx-components.tsx
File metadata and controls
51 lines (50 loc) · 1.52 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import Link from "fumadocs-core/link";
import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
import { CodeBlock, Pre } from "fumadocs-ui/components/codeblock";
import { Heading } from "fumadocs-ui/components/heading";
import { ImageZoom } from "fumadocs-ui/components/image-zoom";
import { Step, Steps } from "fumadocs-ui/components/steps";
import { Tab, Tabs } from "fumadocs-ui/components/tabs";
import { Callout } from "fumadocs-ui/components/callout";
import defaultComponents from "fumadocs-ui/mdx";
import { TypeTable } from "fumadocs-ui/components/type-table";
import type { MDXComponents } from "mdx/types";
import {
GoogelPlayIcon,
SvgComponent,
SvgComponent2,
SvgComponentTest,
} from "@/components/images";
import { ThemeAwareSVG } from "@/components/theme-aware-svg";
import { Separator } from "@/components/seperator";
import CommandTable from "@/components/table";
export function useMDXComponents(components: MDXComponents): MDXComponents {
return {
...defaultComponents,
...components,
Link,
ImageZoom,
Heading,
ul: (props) => <ul className=" pl-[1.6em] indent-[-1.4em] " {...props} />,
SvgComponent,
SvgComponent2,
SvgComponentTest,
Steps,
Step,
GoogelPlayIcon,
CommandTable,
Separator,
Tabs,
Tab,
Accordions,
Accordion,
ThemeAwareSVG,
TypeTable,
Callout,
pre: ({ ref: _ref, ...props }) => (
<CodeBlock {...props}>
<Pre className=" max-h-[400px]">{props.children}</Pre>
</CodeBlock>
),
};
}