diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-06-26 17:18:16 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-06-26 17:18:16 -0700 |
commit | f2a0ed0fbaf1b4495e76f85995875d7ff2dc8d6f (patch) | |
tree | 763673980f98664dabb90f22dd7c0f433357e520 /extension/react-app/src/components/StyledCode.tsx | |
parent | f3c6533d4054de5a71c8867c2b76fc8b0747447c (diff) | |
download | sncontinue-f2a0ed0fbaf1b4495e76f85995875d7ff2dc8d6f.tar.gz sncontinue-f2a0ed0fbaf1b4495e76f85995875d7ff2dc8d6f.tar.bz2 sncontinue-f2a0ed0fbaf1b4495e76f85995875d7ff2dc8d6f.zip |
fixed padding on syntax highlihgting
Diffstat (limited to 'extension/react-app/src/components/StyledCode.tsx')
-rw-r--r-- | extension/react-app/src/components/StyledCode.tsx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/extension/react-app/src/components/StyledCode.tsx b/extension/react-app/src/components/StyledCode.tsx index 66135d65..485c70b6 100644 --- a/extension/react-app/src/components/StyledCode.tsx +++ b/extension/react-app/src/components/StyledCode.tsx @@ -1,12 +1,17 @@ import { Prism as SyntaxHighlighter } from "react-syntax-highlighter"; -import { synthwave84 } from "react-syntax-highlighter/dist/esm/styles/prism"; +import { vscDarkPlus as highlightStyle } from "react-syntax-highlighter/dist/esm/styles/prism"; interface StyledCodeProps { children: string; + language?: string; } const StyledCode = (props: StyledCodeProps) => ( - <SyntaxHighlighter style={synthwave84}> + <SyntaxHighlighter + customStyle={{ margin: "0" }} + style={highlightStyle} + language={props.language || "python"} + > {(props.children as any).props.children} </SyntaxHighlighter> ); |