make code dialog look much nicer
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 1m3s

This commit is contained in:
Lee 2024-04-18 08:37:43 +01:00
parent 413b52b499
commit 3f8204ddd3

@ -1,6 +1,6 @@
import { ReactElement } from "react";
import SyntaxHighlighter from "react-syntax-highlighter";
import { atelierSeasideDark } from "react-syntax-highlighter/dist/esm/styles/hljs";
import { atomOneDark } from "react-syntax-highlighter/dist/esm/styles/hljs";
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger } from "./ui/dialog";
type CodeDialogProps = {
@ -35,10 +35,14 @@ export function CodeDialog({ title, description, code, children }: CodeDialogPro
<DialogDescription>{description}</DialogDescription>
</DialogHeader>
<SyntaxHighlighter
language="javascript"
style={atelierSeasideDark}
language="json"
style={atomOneDark}
wrapLongLines
customStyle={{
maxHeight: "600px",
backgroundColor: "var(--secondary)",
overflow: "hidden",
wordBreak: "break-all",
}}
>
{code}