content: import React from 'react';
  import Highlight, {defaultProps} from 'prism-react-renderer';
  import theme from 'prism-react-renderer/themes/okaidia';
  import PropTypes from 'prop-types';
  
  CodeBlock.propTypes = {
  	children: PropTypes.node,
  	className: PropTypes.string,
  };
  
  function CodeBlock({children, className}) {
  	const language = className.replace(/language-/, '');
  
  	return (
  		<Highlight {...defaultProps} code={children} language={language} theme={theme}>
  			{({className, style, tokens, getLineProps, getTokenProps}) => (
  				<pre className={className} style={{...style, padding: '20px'}}>
  					{tokens.map((line, i) => (
  						<div key={i} {...getLineProps({line, key: i})}>
  							{line.map((token, key) => (
  								<span key={key} {...getTokenProps({token, key})} />
  							))}
  						</div>
  					))}
  				</pre>
  			)}
  		</Highlight>
  	);
  }
  
  export default CodeBlock;
  