import React from "react"; /* -------------------------------------------------------------------------- */ /* MarkDown */ /* -------------------------------------------------------------------------- */ import ReactMarkdown from "react-markdown"; import remarkGfm from "remark-gfm"; /* -------------------------------------------------------------------------- */ /* Components */ /* -------------------------------------------------------------------------- */ import Typography from "./typography/Typography"; import Heading from "./typography/Heading"; import Link from "./Link"; /* -------------------------------------------------------------------------- */ /* Code */ /* -------------------------------------------------------------------------- */ import vsc from "react-syntax-highlighter/dist/esm/styles/prism/vsc-dark-plus"; import { darcula } from "react-syntax-highlighter/dist/esm/styles/prism"; import docco from "react-syntax-highlighter/dist/esm/styles/prism"; import { Prism as SyntaxHighlighter } from "react-syntax-highlighter"; export type Props = { markdown: string; }; const Markdown = ({ markdown }: Props) => { return ( { return ( {props.children} ); }, code({ node, inline, className, children, ...props }) { const match = /language-(\w+)/.exec(className || ""); return !inline && match ? ( ) : ( {children} ); }, }} /> ); }; export default Markdown;