Skip to content

Commit 98aa054

Browse files
committed
Use same editor bg
1 parent 0c2ffc9 commit 98aa054

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

site/src/components/SyntaxHighlighter/SyntaxHighlighter.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { type ComponentProps, type FC } from "react";
22
import Editor, { DiffEditor, loader } from "@monaco-editor/react";
33
import * as monaco from "monaco-editor";
44
import { useCoderTheme } from "./coderTheme";
5+
import { useTheme } from "@emotion/react";
56

67
loader.config({ monaco });
78

@@ -20,6 +21,7 @@ export const SyntaxHighlighter: FC<SyntaxHighlighterProps> = ({
2021
editorProps,
2122
}) => {
2223
const hasDiff = compareWith && value !== compareWith;
24+
const theme = useTheme();
2325
const coderTheme = useCoderTheme();
2426
const commonProps = {
2527
language,
@@ -45,6 +47,7 @@ export const SyntaxHighlighter: FC<SyntaxHighlighterProps> = ({
4547
css={{
4648
padding: "8px 0",
4749
height: "100%",
50+
backgroundColor: theme.monaco.colors["editor.background"],
4851
}}
4952
>
5053
{hasDiff ? (

site/src/modules/templates/TemplateFiles/TemplateFiles.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ const styles = {
185185
filePanel: (theme) => ({
186186
borderRadius: 8,
187187
border: `1px solid ${theme.palette.divider}`,
188+
overflow: "hidden",
188189
}),
189190

190191
fileHeader: (theme) => ({

0 commit comments

Comments
 (0)