text: import React from 'react'
  import Highlight, { defaultProps } from 'prism-react-renderer'
  import theme from 'prism-react-renderer/themes/vsDark'
  
  const Example = props => {
    const code = props.children.props.children.trim()
    const className = props.children.props.className
    const language = className.replace(/language-/, '')
    return (
      <Highlight {...defaultProps} theme={theme} code={code} language={language}>
        {({ className, style, tokens, getLineProps, getTokenProps }) => (
          <pre className={className} style={style}>
            {tokens.map((line, i) => (
              <div {...getLineProps({ line, key: i })}>
                {line.map((token, key) => (
                  <span {...getTokenProps({ token, key })} />
                ))}
              </div>
            ))}
          </pre>
        )}
      </Highlight>
    )
  }
  
  export default Example
  