Skip to content

Commit 191092b

Browse files
committed
fix: update Monaco editor theme names to use -default suffix for GitHub themes
1 parent 10f3d82 commit 191092b

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

vibes.diy/pkg/app/components/ResultPreview/IframeContent.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ const IframeContent: React.FC<IframeContentProps> = ({
132132
useEffect(() => {
133133
if (monacoApiRef.current) {
134134
// Update the Shiki theme in Monaco when dark mode changes from parent
135-
const currentTheme = isDarkMode ? "github-dark" : "github-light";
135+
const currentTheme = isDarkMode
136+
? "github-dark-default"
137+
: "github-light-default";
136138
// Use monaco editor namespace to set theme
137139
monacoApiRef.current.editor.setTheme(currentTheme);
138140
}
@@ -260,7 +262,7 @@ const IframeContent: React.FC<IframeContentProps> = ({
260262
width="100%"
261263
path="file.jsx"
262264
defaultLanguage="jsx"
263-
theme={isDarkMode ? "github-dark" : "github-light"}
265+
theme={isDarkMode ? "github-dark-default" : "github-light-default"}
264266
value={editedCode}
265267
onChange={handleCodeChange}
266268
options={{

vibes.diy/pkg/app/components/ResultPreview/setupMonacoEditor.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ export async function setupMonacoEditor(
8888
});
8989
setHighlighter(highlighter);
9090
await shikiToMonaco(highlighter, monaco);
91-
const currentTheme = isDarkMode ? "github-dark" : "github-light";
91+
const currentTheme = isDarkMode
92+
? "github-dark-default"
93+
: "github-light-default";
9294
monaco.editor.setTheme(currentTheme);
9395
const model = editor.getModel();
9496
if (model) {

0 commit comments

Comments
 (0)