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 b536dc0c..1cad4a36 100644 --- a/subprojects/frontend/src/editor/EditorTheme.ts +++ b/subprojects/frontend/src/editor/EditorTheme.ts | |||
@@ -18,7 +18,13 @@ import { range } from 'lodash-es'; | |||
18 | 18 | ||
19 | import svgURL from '../utils/svgURL'; | 19 | import svgURL from '../utils/svgURL'; |
20 | 20 | ||
21 | function createTypeHashStyles(theme: Theme): CSSObject { | 21 | function createTypeHashStyles( |
22 | theme: Theme, | ||
23 | colorIdentifiers: boolean, | ||
24 | ): CSSObject { | ||
25 | if (!colorIdentifiers) { | ||
26 | return {}; | ||
27 | } | ||
22 | const result: CSSObject = {}; | 28 | const result: CSSObject = {}; |
23 | range(theme.palette.highlight.typeHash.length).forEach((i) => { | 29 | range(theme.palette.highlight.typeHash.length).forEach((i) => { |
24 | result[`.tok-problem-typeHash-${i}`] = { | 30 | result[`.tok-problem-typeHash-${i}`] = { |
@@ -38,7 +44,8 @@ export default styled('div', { | |||
38 | })<{ | 44 | })<{ |
39 | showLineNumbers: boolean; | 45 | showLineNumbers: boolean; |
40 | showActiveLine: boolean; | 46 | showActiveLine: boolean; |
41 | }>(({ theme, showLineNumbers, showActiveLine }) => { | 47 | colorIdentifiers: boolean; |
48 | }>(({ theme, showLineNumbers, showActiveLine, colorIdentifiers }) => { | ||
42 | const editorFontStyle: CSSObject = { | 49 | const editorFontStyle: CSSObject = { |
43 | ...theme.typography.editor, | 50 | ...theme.typography.editor, |
44 | fontWeight: theme.typography.fontWeightEditorNormal, | 51 | fontWeight: theme.typography.fontWeightEditorNormal, |
@@ -148,7 +155,7 @@ export default styled('div', { | |||
148 | fontStyle: 'normal', | 155 | fontStyle: 'normal', |
149 | }, | 156 | }, |
150 | }, | 157 | }, |
151 | ...createTypeHashStyles(theme), | 158 | ...createTypeHashStyles(theme, colorIdentifiers), |
152 | }; | 159 | }; |
153 | 160 | ||
154 | const matchingStyle: CSSObject = { | 161 | const matchingStyle: CSSObject = { |