File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -7,3 +7,9 @@ function foobarloremipsumfoobarloremipsumsitametfoobarloremipsumfoobarloremipsum
7
7
return 8
8
8
}
9
9
```
10
+
11
+ <CH.Preview >
12
+
13
+ Hello
14
+
15
+ </CH.Preview >
Original file line number Diff line number Diff line change 6
6
SandboxInfo ,
7
7
} from "@codesandbox/sandpack-client"
8
8
import { EditorStep } from "../mini-editor"
9
+ import { CodeConfig } from "../smooth-code"
9
10
10
11
export type PresetConfig = SandboxInfo
11
12
export function Preview ( {
@@ -16,6 +17,7 @@ export function Preview({
16
17
children,
17
18
style,
18
19
frameless,
20
+ codeConfig,
19
21
...rest
20
22
} : {
21
23
className : string
@@ -25,6 +27,7 @@ export function Preview({
25
27
show ?: string
26
28
style ?: React . CSSProperties
27
29
children ?: React . ReactNode
30
+ codeConfig ?: CodeConfig
28
31
} ) {
29
32
const kids = presetConfig ? (
30
33
< SandpackPreview
@@ -40,6 +43,7 @@ export function Preview({
40
43
"ch-preview" + ( className ? " " + className : "" )
41
44
}
42
45
style = { style }
46
+ data-ch-theme = { codeConfig ?. themeName }
43
47
>
44
48
{ frameless ? (
45
49
kids
Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ export function Slideshow({
97
97
withPreview ? "ch-slideshow-with-preview" : ""
98
98
} ${ className || "" } `}
99
99
style = { style }
100
+ data-ch-theme = { codeConfig . themeName }
100
101
>
101
102
< div className = "ch-slideshow-slide" >
102
103
< InnerCode
You can’t perform that action at this time.
0 commit comments