import ReactMarkdown from 'react-markdown'; import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter'; import { vscDarkPlus } from 'react-syntax-highlighter/dist/esm/styles/prism'; import remarkGfm from 'remark-gfm'; import remarkMath from 'remark-math' import rehypeKatex from 'rehype-katex' import { Button, CopyButton } from '@mantine/core'; export interface MarkdownProps { content: string; className?: string; } export function Markdown(props: MarkdownProps) { const classes = ['prose', 'dark:prose-invert']; if (props.className) { classes.push(props.className); } return (
{({ copy, copied }) => ( )}
) : ( {children} ) } }}>{props.content} ); }