import React from 'react' import Highlight, { defaultProps } from 'prism-react-renderer' import type { Language } from 'prism-react-renderer' import theme from 'prism-react-renderer/themes/github' // copied from https://mdxjs.com/guides/syntax-highlighting interface Props { readonly className?: string readonly children?: string readonly style?: React.CSSProperties } const HighLightCode = ({ children = '', className = '', style: propStyle }: Props) => { const language = className?.replace(/language-/, '') as Language return ( {({ className, style, tokens, getLineProps, getTokenProps }) => (
          {tokens.map((line, i) => (
            
{line.map((token, key) => ( ))}
))}
)}
) } export default HighLightCode