Updated style for MD code view
This commit is contained in:
parent
eb17ae6377
commit
8d3115d878
@ -14,9 +14,8 @@ import Heading from "./typography/Heading";
|
|||||||
/* Code */
|
/* Code */
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
|
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
|
||||||
import { dark } from "react-syntax-highlighter/dist/esm/styles/prism";
|
import { oneLight } from "react-syntax-highlighter/dist/esm/styles/prism";
|
||||||
import Link from "./typography/Link";
|
import Link from "./typography/Link";
|
||||||
import style from "react-syntax-highlighter/dist/esm/styles/hljs/a11y-dark";
|
|
||||||
|
|
||||||
export type Props = {
|
export type Props = {
|
||||||
markdown: string;
|
markdown: string;
|
||||||
@ -153,7 +152,7 @@ const Markdown = ({ markdown }: Props) => {
|
|||||||
return !inline && match ? (
|
return !inline && match ? (
|
||||||
<SyntaxHighlighter
|
<SyntaxHighlighter
|
||||||
children={String(children).replace(/\n$/, "")}
|
children={String(children).replace(/\n$/, "")}
|
||||||
style={dark}
|
style={oneLight}
|
||||||
language={match[1]}
|
language={match[1]}
|
||||||
PreTag="div"
|
PreTag="div"
|
||||||
/>
|
/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user