-
Notifications
You must be signed in to change notification settings - Fork 1
/
mdx-components.tsx
33 lines (32 loc) · 990 Bytes
/
mdx-components.tsx
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
import type { MDXComponents } from "mdx/types"
import { Screenshot } from "@/components/screenshot"
import defaultComponents from "fumadocs-ui/mdx"
import { Step, Steps } from "fumadocs-ui/components/steps"
import { Tab, Tabs } from "fumadocs-ui/components/tabs"
import { ImageZoom } from "fumadocs-ui/components/image-zoom"
import { File, Files } from "fumadocs-ui/components/files"
import { Callout } from "fumadocs-ui/components/callout"
import { AutoTypeTable } from "fumadocs-typescript/ui"
import { Accordion, Accordions } from "fumadocs-ui/components/accordion"
import { Popup, PopupTrigger, PopupContent } from "fumadocs-ui/twoslash/popup"
export function useMDXComponents(components: MDXComponents): MDXComponents {
return {
Popup,
PopupTrigger,
PopupContent,
Accordions,
Accordion,
AutoTypeTable,
Callout,
Files,
File,
ImageZoom,
Tab,
Tabs,
Step,
Steps,
Screenshot,
...defaultComponents,
...components,
}
}