fix: Update docs; Fix useMDXComponents for li override: add missing id for correct remark-gfm footnotes functionallity

This commit is contained in:
seppulcro
2024-09-23 16:13:16 +01:00
parent 5b0bf99cbf
commit 59386ed4b7
2 changed files with 16 additions and 13 deletions

View File

@@ -3,15 +3,17 @@ import defaultComponents from "fumadocs-ui/mdx";
import type { MDXComponents } from "mdx/types";
export function useMDXComponents(components: MDXComponents): MDXComponents {
return {
...defaultComponents,
...components,
ImageZoom,
p: ({ children }) => (
<p className="text-[#3E4342] dark:text-muted-foreground">{children}</p>
),
li: ({ children }) => (
<li className="text-[#3E4342] dark:text-muted-foreground">{children}</li>
),
};
return {
...defaultComponents,
...components,
ImageZoom,
p: ({ children }) => (
<p className="text-[#3E4342] dark:text-muted-foreground">{children}</p>
),
li: ({ children, id }) => (
<li {...{ id }} className="text-[#3E4342] dark:text-muted-foreground">
{children}
</li>
),
};
}