This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
FunctionProject/website/components/CodeBlock.js
2020-05-06 10:39:22 +02:00

12 lines
351 B
JavaScript

import SyntaxHighlighter from "react-syntax-highlighter";
import { atomOneDark as styles} from "react-syntax-highlighter/dist/cjs/styles/hljs";
const CodeBlock = ({ language, value }) => {
return (
<SyntaxHighlighter language={language} style={styles}>
{value}
</SyntaxHighlighter>
);
};
export default CodeBlock;