summaryrefslogtreecommitdiff
path: root/extension/react-app/src/components/StyledCode.tsx
blob: 66135d657450ea424da3137cd68d3eede50fdee5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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 as any).props.children}
  </SyntaxHighlighter>
);

export default StyledCode;