teableio/teable

View on GitHub
apps/nextjs-app/src/features/app/components/mark-down-preview/index.tsx

Summary

Maintainability
A
0 mins
Test Coverage
import Markdown from 'react-markdown';
import rehypeRaw from 'rehype-raw';
import remarkGfm from 'remark-gfm';

export const MarkdownPreview = (props: { children?: string }) => {
  return (
    <Markdown
      className="markdown-body !bg-background px-3 py-2 !text-sm !text-foreground"
      rehypePlugins={[rehypeRaw]}
      remarkPlugins={[remarkGfm]}
    >
      {props.children}
    </Markdown>
  );
};