-
Notifications
You must be signed in to change notification settings - Fork 1
/
mdx-components.tsx
47 lines (44 loc) · 1.21 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import type { MDXComponents } from "mdx/types";
import { Callout } from "@/components/content/callout";
import { Disclosure } from "@/components/content/disclosure";
import { Download } from "@/components/content/download";
import { Embed } from "@/components/content/embed";
import { Figure } from "@/components/content/figure";
import {
FootnoteContent,
FootnoteReference,
FootnotesSection,
} from "@/components/content/footnote";
import { Image } from "@/components/content/image";
import { Quiz, QuizErrorMessage, QuizSuccessMessage } from "@/components/content/quiz";
import { QuizChoice, QuizChoiceAnswer, QuizChoiceQuestion } from "@/components/content/quiz-choice";
import { Tab, Tabs } from "@/components/content/tabs";
import { Video } from "@/components/content/video";
import { Link } from "@/components/link";
const shared = {
a: Link,
Callout,
Disclosure,
Download,
Embed,
Figure,
FootnoteContent,
FootnoteReference,
FootnotesSection,
img: Image,
Quiz,
QuizChoice,
QuizChoiceAnswer,
QuizChoiceQuestion,
QuizErrorMessage,
QuizSuccessMessage,
Tabs,
Tab,
Video,
} as MDXComponents;
export function useMDXComponents(components?: MDXComponents): MDXComponents {
return {
...shared,
...components,
};
}