File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,3 +7,9 @@ function foobarloremipsumfoobarloremipsumsitametfoobarloremipsumfoobarloremipsum
77 return 8
88}
99```
10+
11+ <CH.Preview >
12+
13+ Hello
14+
15+ </CH.Preview >
Original file line number Diff line number Diff line change 66 SandboxInfo ,
77} from "@codesandbox/sandpack-client"
88import { EditorStep } from "../mini-editor"
9+ import { CodeConfig } from "../smooth-code"
910
1011export type PresetConfig = SandboxInfo
1112export function Preview ( {
@@ -16,6 +17,7 @@ export function Preview({
1617 children,
1718 style,
1819 frameless,
20+ codeConfig,
1921 ...rest
2022} : {
2123 className : string
@@ -25,6 +27,7 @@ export function Preview({
2527 show ?: string
2628 style ?: React . CSSProperties
2729 children ?: React . ReactNode
30+ codeConfig ?: CodeConfig
2831} ) {
2932 const kids = presetConfig ? (
3033 < SandpackPreview
@@ -40,6 +43,7 @@ export function Preview({
4043 "ch-preview" + ( className ? " " + className : "" )
4144 }
4245 style = { style }
46+ data-ch-theme = { codeConfig ?. themeName }
4347 >
4448 { frameless ? (
4549 kids
Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ export function Slideshow({
9797 withPreview ? "ch-slideshow-with-preview" : ""
9898 } ${ className || "" } `}
9999 style = { style }
100+ data-ch-theme = { codeConfig . themeName }
100101 >
101102 < div className = "ch-slideshow-slide" >
102103 < InnerCode
You can’t perform that action at this time.
0 commit comments