import ReactMarkdown from "react-markdown" import remarkGfm from "remark-gfm" import { PrismAsyncLight as SyntaxHighlighter } from 'react-syntax-highlighter'; // @ts-ignore because of no types in remark-a11y-emoji import a11yEmoji from '@fec/remark-a11y-emoji'; import styles from './preview.module.css' import { duotoneDark, duotoneLight } from 'react-syntax-highlighter/dist/cjs/styles/prism' import useSharedState from "../../lib/hooks/use-shared-state"; type Props = { content: string | undefined height: number | string } const ReactMarkdownPreview = ({ content, height }: Props) => { const [themeType] = useSharedState('theme') return (
{String(children).replace(/\n$/, '')} ) : ( {children} ) } }}> {content || ""}
) } export default ReactMarkdownPreview