FunctionProject/website/components/CodeBlock.jsx

13 lines
330 B
React
Raw Normal View History

2020-08-03 12:04:07 +02:00
import SyntaxHighlighter from 'react-syntax-highlighter'
import { atomOneDark as styles } from 'react-syntax-highlighter/dist/cjs/styles/hljs'
const CodeBlock = ({ language, value }) => {
2020-08-03 12:04:07 +02:00
return (
<SyntaxHighlighter language={language} style={styles}>
{value}
</SyntaxHighlighter>
)
}
2020-08-03 12:04:07 +02:00
export default CodeBlock