smaller font size on inline editor

This commit is contained in:
Ruben Fiszel
2023-12-04 21:32:54 +01:00
parent 6e29f08256
commit 2ea609acbb
2 changed files with 4 additions and 0 deletions
@@ -89,6 +89,7 @@
export let args: Record<string, any> | undefined = undefined
export let useWebsockets: boolean = true
export let listenEmptyChanges = false
export let small = false
const rHash = randomHash()
$: filePath = computePath(path)
@@ -910,6 +911,7 @@
editor = meditor.create(divEl as HTMLDivElement, {
...editorConfig(code, lang, automaticLayout, fixedOverflowWidgets),
model,
fontSize: !small ? 14 : 12,
overflowWidgetsDomNode: widgets,
tabSize: lang == 'python' ? 4 : 2,
folding
@@ -257,6 +257,7 @@
deno={inlineScript.language == 'deno'}
path={inlineScript.path}
bind:this={editor}
small
class="flex flex-1 grow h-full"
lang={scriptLangToEditorLang(inlineScript?.language)}
bind:code={inlineScript.content}
@@ -297,6 +298,7 @@
<SimpleEditor
bind:this={simpleEditor}
class="h-full"
small
{extraLib}
bind:code={inlineScript.content}
lang="javascript"