fix: max width docs images

This commit is contained in:
TrèsAbhi committed 2025-08-18 11:11:35 -05:00
1 parent 7c29046390
commit 62fed63310
1 file changed
+6
@@ -1,10 +1,15 @@
import { Link, Table } from '@radix-ui/themes';
import MarkdownToJSX from 'markdown-to-jsx';
import type { ComponentProps } from 'react';
interface MarkdownProps {
children: string;
}
function Image(props: ComponentProps<'img'>) {
return <img style={{ maxWidth: '100%' }} {...props} />;
}
export function Markdown({ children }: MarkdownProps) {
return (
<MarkdownToJSX
@@ -17,6 +22,7 @@ export function Markdown({ children }: MarkdownProps) {
tr: { component: Table.Row },
th: { component: Table.ColumnHeaderCell },
td: { component: Table.Cell },
img: { component: Image },
},
}}
>