2025-03-07 03:36:53 +00:00
|
|
|
import { HTMLAttributes } from "react";
|
|
|
|
import { Pre } from "@/components/content/pre";
|
2025-03-26 14:48:00 +00:00
|
|
|
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
2025-03-07 03:36:53 +00:00
|
|
|
|
|
|
|
export const MdxComponents = {
|
|
|
|
pre: (props: HTMLAttributes<HTMLPreElement>) => <Pre {...props} />,
|
2025-03-26 14:48:00 +00:00
|
|
|
ol: (props: HTMLAttributes<HTMLOListElement>) => (
|
|
|
|
<ol style={{ listStyle: "revert" }} {...props} />
|
|
|
|
),
|
|
|
|
ul: (props: HTMLAttributes<HTMLUListElement>) => (
|
|
|
|
<ul style={{ listStyle: "revert" }} {...props} />
|
|
|
|
),
|
|
|
|
table: (props: HTMLAttributes<HTMLTableElement>) => (
|
|
|
|
<ScrollArea>
|
|
|
|
<table {...props} />
|
|
|
|
<ScrollBar orientation="horizontal" />
|
|
|
|
</ScrollArea>
|
|
|
|
),
|
2025-03-07 03:36:53 +00:00
|
|
|
};
|