14 lines
No EOL
370 B
TypeScript
14 lines
No EOL
370 B
TypeScript
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
|
|
import { synthwave84 } from "react-syntax-highlighter/dist/esm/styles/prism";
|
|
|
|
interface StyledCodeProps {
|
|
children: string;
|
|
}
|
|
|
|
const StyledCode = (props: (StyledCodeProps)) => (
|
|
<SyntaxHighlighter style={synthwave84}>
|
|
{props.children}
|
|
</SyntaxHighlighter>
|
|
);
|
|
|
|
export default StyledCode; |