summaryrefslogtreecommitdiff
path: root/extension/react-app/src/components/StyledCode.tsx
diff options
context:
space:
mode:
authorTy Dunn <ty@tydunn.com>2023-06-18 16:28:52 -0700
committerTy Dunn <ty@tydunn.com>2023-06-18 16:28:52 -0700
commit40b3a4dc706849492123e41e57b0207cb95b9312 (patch)
tree4c365753d702750cab5bca4eecaa5a163fef7f5d /extension/react-app/src/components/StyledCode.tsx
parentc873c511cd148b8e80044671dcd47d0da8374d3a (diff)
downloadsncontinue-40b3a4dc706849492123e41e57b0207cb95b9312.tar.gz
sncontinue-40b3a4dc706849492123e41e57b0207cb95b9312.tar.bz2
sncontinue-40b3a4dc706849492123e41e57b0207cb95b9312.zip
initial code
Diffstat (limited to 'extension/react-app/src/components/StyledCode.tsx')
-rw-r--r--extension/react-app/src/components/StyledCode.tsx14
1 files changed, 14 insertions, 0 deletions
diff --git a/extension/react-app/src/components/StyledCode.tsx b/extension/react-app/src/components/StyledCode.tsx
new file mode 100644
index 00000000..16183e7f
--- /dev/null
+++ b/extension/react-app/src/components/StyledCode.tsx
@@ -0,0 +1,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 language="auto" style={synthwave84}>
+ {props.children}
+ </SyntaxHighlighter>
+);
+
+export default StyledCode; \ No newline at end of file