Raw
1 import type { MDXComponents } from "mdx/types"
2 import getCustomComponents from "./components/MDXComponents"
3
4 // This file allows you to provide custom React components
5 // to be used in MDX files. You can import and use any
6 // React component you want, including components from
7 // other libraries.
8
9 // This file is required to use MDX in `app` directory.
10 export function useMDXComponents(components: MDXComponents): MDXComponents {
11 return {
12 // Allows customizing built-in components, e.g. to add styling.
13 // h1: ({ children }) => <h1 style={{ fontSize: "100px" }}>{children}</h1>,
14 ...components,
15 ...getCustomComponents(),
16 }
17 }