aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/frontend/src/editor/EditorTheme.ts
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2022-09-30 20:06:09 +0200
committerLibravatar Kristóf Marussy <kristof@marussy.com>2022-10-03 20:06:52 +0200
commitcfdc9eae27e0fc6197abe694c7488a169dd618e9 (patch)
tree9ea9d5d2282369162a5fe8baa1f0ea79d5d2f10d /subprojects/frontend/src/editor/EditorTheme.ts
parentfeat: data structure for default assertions (diff)
downloadrefinery-cfdc9eae27e0fc6197abe694c7488a169dd618e9.tar.gz
refinery-cfdc9eae27e0fc6197abe694c7488a169dd618e9.tar.zst
refinery-cfdc9eae27e0fc6197abe694c7488a169dd618e9.zip
fix(frontend): editor selection visibility
Diffstat (limited to 'subprojects/frontend/src/editor/EditorTheme.ts')
-rw-r--r--subprojects/frontend/src/editor/EditorTheme.ts13
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
11export default styled('div', { 11export 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' && {