import { type FC } from 'react' import SyntaxHighlighter from 'react-syntax-highlighter'; import { atelierHeathLight } from 'react-syntax-highlighter/dist/esm/styles/hljs'; import CopyBtn from './CopyBtn'; type ICodeBlockProps = { value: string; needCopy?: boolean; size?: 'small' | 'default'; showLineNumbers?: boolean; } // enum languageType { // echarts = 'echarts', // mermaid = 'mermaid', // svg = 'svg', // } const CodeBlock: FC = ({ value, needCopy = true, size = 'default', showLineNumbers = false }) => { return (
{value} {needCopy && }
) } export default CodeBlock