mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 02:37:05 +02:00
fix: max width docs images
This commit is contained in:
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 },
|
||||
},
|
||||
}}
|
||||
>
|
||||
|
||||
Reference in new issue
Block a user