Skip to content

Commit 3885978

Browse files
committed
Add default theme
1 parent e9ed53b commit 3885978

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

playground/src/preview.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { remarkCodeHike } from "@code-hike/mdx";
55
import { CH } from "@code-hike/mdx/components";
66
import "@code-hike/mdx/styles.css";
77
import { ErrorBoundary } from "react-error-boundary";
8+
import theme from "shiki/themes/material-darker.json";
89

910
export function Preview(props) {
1011
return (
@@ -30,7 +31,7 @@ function InnerPreview({ code }) {
3031
useEffect(() => {
3132
compile(code, {
3233
outputFormat: "function-body",
33-
remarkPlugins: [[remarkCodeHike, { autoImport: false }]],
34+
remarkPlugins: [[remarkCodeHike, { autoImport: false, theme }]],
3435
})
3536
.then((c) => {
3637
return run(String(c), runtime);

0 commit comments

Comments
 (0)