diff --git a/mdx-components.tsx b/mdx-components.tsx new file mode 100644 index 0000000..6d95c43 --- /dev/null +++ b/mdx-components.tsx @@ -0,0 +1,62 @@ +import type { MDXComponents } from 'mdx/types' + +export function useMDXComponents(components: MDXComponents): MDXComponents { + return { + ...components, + // Typography + h1: ({ children }) => ( +

+ {children} +

+ ), + h2: ({ children }) => ( +

+ {children} +

+ ), + h3: ({ children }) => ( +

+ {children} +

+ ), + p: ({ children }) => ( +

+ {children} +

+ ), + blockquote: ({ children }) => ( +
+ {children} +
+ ), + hr: () =>
, + a: ({ href, children }) => ( + + {children} + + ), + code: ({ children, ...props }) => ( + + {children} + + ), + pre: ({ children, ...props }) => ( +
+        {children}
+      
+ ), + img: ({ src, alt, ...rest }) => ( + {alt} + ), + table: ({ children }) => ( +
+ + {children} +
+
+ ), + } +}