mirror of
https://github.com/cfngc4594/monaco-editor-lsp-next.git
synced 2025-05-18 15:26:36 +00:00
feat(mdx): add scroll support for tables
This commit is contained in:
parent
9e634853e8
commit
793db58e36
@ -1,8 +1,19 @@
|
||||
import { HTMLAttributes } from "react";
|
||||
import { Pre } from "@/components/content/pre";
|
||||
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
||||
|
||||
export const MdxComponents = {
|
||||
pre: (props: HTMLAttributes<HTMLPreElement>) => <Pre {...props} />,
|
||||
ol: (props: HTMLAttributes<HTMLOListElement>) => <ol style={{ listStyle: "revert" }} {...props} />,
|
||||
ul: (props: HTMLAttributes<HTMLUListElement>) => <ul style={{ listStyle: "revert" }} {...props} />,
|
||||
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>
|
||||
),
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user