chore: solve issues with sql-editor styles

This commit is contained in:
Dmitry Krupenya
2020-05-18 17:08:38 +03:00
parent ddcec38a7d
commit b77426eb8c
3 changed files with 15 additions and 5 deletions
@@ -32,11 +32,11 @@ $error: #f00;
$delimiter: rgb(238, 204, 100);
$cursor: #fff;
.CodeMirror-hints {
:global .CodeMirror-hints {
@include mdc-elevation(3);
@include mdc-typography(caption);
}
.theme-dark {
:global .theme-dark {
@include base-code-editor;
}
@@ -32,11 +32,11 @@ $error: #f00;
$delimiter: rgb(238, 204, 100);
$cursor: #000;
.CodeMirror-hints {
:global .CodeMirror-hints {
@include mdc-elevation(3);
@include mdc-typography(caption);
}
.theme-light {
:global .theme-light {
@include base-code-editor;
}
@@ -9,6 +9,16 @@
import { ThemeSelector } from '@dbeaver/core/theming';
export const SqlEditorStyles: ThemeSelector = async (theme) => {
const styles = await import(`./${theme}.scss`);
let styles: any;
switch (theme) {
case 'dark':
styles = await import('./dark.module.scss');
break;
default:
styles = await import('./light.module.scss');
break;
}
return styles.default;
};