-
Notifications
You must be signed in to change notification settings - Fork 4
/
mdx-components.tsx
39 lines (38 loc) · 1.17 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
import {
AlertTitle,
AccordionDetails as MAccordionDetails,
} from "@mui/material";
import { MDXComponents } from "mdx/types";
import * as C from "./app/components";
import { CardActions } from "./app/components/Home/components/Section/components/SectionHero/components/Carousel/components/Cards/cards.styles";
import { Accordion } from "./app/components/common/Accordion/accordion";
import { AccordionSummary } from "./app/components/common/Accordion/components/AccordionSummary/accordionSummary";
import { Figure } from "./app/components/common/Figure/figure";
import {
Section,
SectionContent,
SectionHeadline,
SectionLayout,
SubHeadline,
} from "./app/components/content/content.styles";
export function useMDXComponents(components: MDXComponents): MDXComponents {
return {
...components,
Accordion,
AccordionDetails: MAccordionDetails,
AccordionSummary,
Alert: C.Alert,
AlertTitle,
CardActions,
Figure,
Grid: C.Grid,
Link: C.Link,
RoundedPaper: C.RoundedPaper,
Section,
SectionContent,
SectionHeadline,
SectionLayout,
SubHeadline,
a: ({ children, href }) => C.Link({ label: children, url: href ?? "" }),
};
}