aboutsummaryrefslogtreecommitdiff
path: root/source/library/components/Editor.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'source/library/components/Editor.svelte')
-rw-r--r--source/library/components/Editor.svelte9
1 files changed, 4 insertions, 5 deletions
diff --git a/source/library/components/Editor.svelte b/source/library/components/Editor.svelte
index 073a76a..77ef5ea 100644
--- a/source/library/components/Editor.svelte
+++ b/source/library/components/Editor.svelte
@@ -1,12 +1,12 @@
<script lang="ts">
/*** IMPORT ------------------------------------------- ***/
-
import { onMount } from "svelte";
- import type { Extension } from "@codemirror/state";
import type { EditorView } from "@codemirror/view";
+ import type { Extension } from "@codemirror/state";
import type { GraphQLSchema } from "graphql";
/*** UTILITY ------------------------------------------ ***/
+ import { lightTheme } from "../themes/light.ts";
type Props = {
language?: "graphql" | "json";
@@ -61,7 +61,7 @@
if (disposed)
return;
- const themeExt: Extension = theme ?? (await import("@codemirror/theme-one-dark")).oneDark;
+ const themeExt: Extension = theme ?? lightTheme;
const languageExt = language === "graphql" ?
graphql(schema ? buildSchema(schema) : undefined) :
@@ -131,8 +131,7 @@
<style lang="scss">
.editor {
- height: 100%;
- width: 100%;
+ width: 100%; height: 100%;
:global(.cm-editor) {
height: 100%;