Skip to content

Commit 36ba66a

Browse files
committed
Remove theme from client
1 parent f48d0ce commit 36ba66a

File tree

13 files changed

+4
-91
lines changed

13 files changed

+4
-91
lines changed

packages/mdx/src/mdx-client/preview.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
SandboxInfo,
77
} from "@codesandbox/sandpack-client"
88
import { EditorStep } from "../mini-editor"
9-
import { EditorTheme } from "../utils"
109

1110
export type PresetConfig = SandboxInfo
1211
export function Preview({
@@ -15,7 +14,6 @@ export function Preview({
1514
presetConfig,
1615
show,
1716
children,
18-
codeConfig,
1917
style,
2018
frameless,
2119
...rest
@@ -27,7 +25,6 @@ export function Preview({
2725
show?: string
2826
style?: React.CSSProperties
2927
children?: React.ReactNode
30-
codeConfig: { theme: EditorTheme }
3128
}) {
3229
const kids = presetConfig ? (
3330
<SandpackPreview
@@ -49,7 +46,6 @@ export function Preview({
4946
) : (
5047
<MiniBrowser
5148
loadUrl={show}
52-
theme={codeConfig.theme}
5349
{...rest}
5450
children={kids}
5551
/>

packages/mdx/src/mdx-client/scrollycoding.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ function DynamicScrollycoding({
220220
className="ch-scrollycoding-preview"
221221
files={tab.files}
222222
presetConfig={presetConfig}
223-
codeConfig={codeConfig}
224223
/>
225224
) : hasPreviewSteps ? (
226225
<Preview

packages/mdx/src/mdx-client/slideshow.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ export function Slideshow({
113113
className="ch-slideshow-preview"
114114
files={tab.files}
115115
presetConfig={presetConfig}
116-
codeConfig={codeConfig}
117116
/>
118117
) : hasPreviewSteps ? (
119118
<Preview

packages/mdx/src/mdx-client/slots.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import { CH } from "components"
21
import React from "react"
3-
import { EditorProps, EditorStep } from "../mini-editor"
4-
import { InnerCode, updateEditorStep } from "./code"
2+
import { EditorStep } from "../mini-editor"
3+
import { InnerCode } from "./code"
54
import { Preview } from "./preview"
65

76
export function CodeSlot() {

packages/mdx/src/mdx-client/spotlight.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ export function Spotlight({
9292
className="ch-spotlight-preview"
9393
files={tab.files}
9494
presetConfig={presetConfig}
95-
codeConfig={codeConfig}
9695
/>
9796
) : hasPreviewSteps ? (
9897
<Preview

packages/mdx/src/mini-browser/mini-browser-hike.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { MiniFrame } from "../mini-frame"
33
import { TitleBar } from "./title-bar"
44
import { MiniBrowserStep, useSteps } from "./use-steps"
55
import { useClasser, Classes } from "../classer"
6-
import { EditorTheme } from "../utils"
76

87
type Transition = "none" | "slide"
98

@@ -13,7 +12,6 @@ export type MiniBrowserHikeProps = {
1312
classes?: Classes
1413
steps?: MiniBrowserStep[]
1514
transition?: Transition
16-
theme: EditorTheme
1715
} & React.PropsWithoutRef<JSX.IntrinsicElements["div"]>
1816

1917
const MiniBrowserHike = React.forwardRef<
@@ -28,7 +26,6 @@ function MiniBrowserWithRef(
2826
steps: ogSteps,
2927
transition = "none",
3028
classes,
31-
theme,
3229
...props
3330
}: MiniBrowserHikeProps,
3431
ref: React.Ref<HTMLIFrameElement>
@@ -53,7 +50,6 @@ function MiniBrowserWithRef(
5350
titleBar={
5451
<TitleBar url={displayUrl!} linkUrl={loadUrl!} />
5552
}
56-
theme={theme}
5753
>
5854
{children || <iframe ref={ref} src={loadUrl} />}
5955
</MiniFrame>

packages/mdx/src/mini-frame/mini-frame.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
import React from "react"
2-
import { EditorTheme } from "../utils"
32

43
type MiniFrameProps = {
54
title?: string
65
titleBar?: React.ReactNode
76
zoom?: number
87
overflow?: string
9-
theme: EditorTheme
108
} & React.PropsWithoutRef<JSX.IntrinsicElements["div"]>
119

1210
export const MiniFrame = React.forwardRef<
@@ -17,7 +15,6 @@ export const MiniFrame = React.forwardRef<
1715
title,
1816
children,
1917
titleBar,
20-
theme,
2118
zoom = 1,
2219
overflow,
2320
...props

packages/mdx/src/mini-terminal/mini-terminal-transition.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ function MiniTerminalTransition({
2424
title={title}
2525
{...rest}
2626
className={"ch-terminal-container " + className}
27-
theme={{}}
2827
>
2928
<InnerTerminalTransition
3029
{...{ prev, prevKey, next, nextKey, progress }}

packages/mdx/src/remark/transform.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ function addConfig(
183183
init: valueToEstree({
184184
...config,
185185
themeName,
186-
// theme: undefined,
186+
theme: undefined,
187187
}),
188188
},
189189
],

packages/mdx/src/smooth-code/code-tween.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ export type CodeConfig = {
4141
minZoom?: number
4242
maxZoom?: number
4343
horizontalCenter?: boolean
44-
theme: IRawTheme
4544
lineNumbers?: boolean
4645
showCopyButton?: boolean
4746
showExpandButton?: boolean
@@ -125,7 +124,6 @@ function AfterDimensions({
125124
minZoom = 1,
126125
maxZoom = 1,
127126
horizontalCenter = false,
128-
theme,
129127
},
130128
dimensions,
131129
stepInfo,
@@ -149,7 +147,6 @@ function AfterDimensions({
149147
minZoom={minZoom}
150148
maxZoom={maxZoom}
151149
center={horizontalCenter}
152-
theme={theme}
153150
/>
154151
{config.showCopyButton ? (
155152
<CopyButton

0 commit comments

Comments
 (0)