diff options
Diffstat (limited to 'subprojects/frontend/src/editor/EditorTheme.ts')
-rw-r--r-- | subprojects/frontend/src/editor/EditorTheme.ts | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/subprojects/frontend/src/editor/EditorTheme.ts b/subprojects/frontend/src/editor/EditorTheme.ts index db051d0e..3ec977da 100644 --- a/subprojects/frontend/src/editor/EditorTheme.ts +++ b/subprojects/frontend/src/editor/EditorTheme.ts | |||
@@ -10,8 +10,12 @@ function svgURL(svg: string): string { | |||
10 | 10 | ||
11 | export default styled('div', { | 11 | export default styled('div', { |
12 | name: 'EditorTheme', | 12 | name: 'EditorTheme', |
13 | shouldForwardProp: (propName) => propName !== 'showLineNumbers', | 13 | shouldForwardProp: (propName) => |
14 | })<{ showLineNumbers: boolean }>(({ theme, showLineNumbers }) => { | 14 | propName !== 'showLineNumbers' && propName !== 'showActiveLine', |
15 | })<{ | ||
16 | showLineNumbers: boolean; | ||
17 | showActiveLine: boolean; | ||
18 | }>(({ theme, showLineNumbers, showActiveLine }) => { | ||
15 | const editorFontStyle = { | 19 | const editorFontStyle = { |
16 | ...theme.typography.editor, | 20 | ...theme.typography.editor, |
17 | fontWeight: theme.typography.fontWeightEditorNormal, | 21 | fontWeight: theme.typography.fontWeightEditorNormal, |
@@ -39,7 +43,9 @@ export default styled('div', { | |||
39 | padding: 0, | 43 | padding: 0, |
40 | }, | 44 | }, |
41 | '.cm-activeLine': { | 45 | '.cm-activeLine': { |
42 | background: theme.palette.highlight.activeLine, | 46 | background: showActiveLine |
47 | ? theme.palette.highlight.activeLine | ||
48 | : 'transparent', | ||
43 | }, | 49 | }, |
44 | '.cm-activeLineGutter': { | 50 | '.cm-activeLineGutter': { |
45 | background: 'transparent', | 51 | background: 'transparent', |
@@ -367,6 +373,7 @@ export default styled('div', { | |||
367 | '.cm-tooltip.cm-tooltip-autocomplete': { | 373 | '.cm-tooltip.cm-tooltip-autocomplete': { |
368 | ...editorFontStyle, | 374 | ...editorFontStyle, |
369 | background: theme.palette.background.paper, | 375 | background: theme.palette.background.paper, |
376 | border: 'none', | ||
370 | borderRadius: theme.shape.borderRadius, | 377 | borderRadius: theme.shape.borderRadius, |
371 | overflow: 'hidden', | 378 | overflow: 'hidden', |
372 | ...(theme.palette.mode === 'dark' && { | 379 | ...(theme.palette.mode === 'dark' && { |