remove yPadding in template and simple editor

This commit is contained in:
Diego Imbert
2025-09-27 13:32:01 +02:00
parent 6358bf3e44
commit 8f27c8d0b8
5 changed files with 2 additions and 13 deletions
@@ -766,7 +766,6 @@
<SimpleEditor
bind:this={monaco}
bind:code={arg.expr}
yPadding={8}
{extraLib}
lang="javascript"
shouldBindKey={false}
@@ -89,7 +89,6 @@
{disabled}
{fixedOverflowWidgets}
renderLineHighlight="none"
yPadding={8}
/>
</div>
{#if error != ''}
@@ -90,8 +90,7 @@
key,
disabled = false,
minHeight = 1000,
renderLineHighlight = 'none',
yPadding
renderLineHighlight = 'none'
}: {
lang: string
code?: string
@@ -120,7 +119,6 @@
disabled?: boolean
minHeight?: number
renderLineHighlight?: 'all' | 'line' | 'gutter' | 'none'
yPadding?: number
} = $props()
const dispatch = createEventDispatcher()
@@ -338,7 +336,6 @@
$relativeLineNumbers
),
model,
...(yPadding !== undefined ? { padding: { bottom: yPadding, top: yPadding } } : {}),
renderLineHighlight,
lineDecorationsWidth: 6,
lineNumbersMinChars: 2,
@@ -452,12 +452,7 @@
fontSize,
suggestOnTriggerCharacters: true,
renderLineHighlight: 'none',
lineNumbers: 'off',
padding: {
bottom: 8,
top: 8
}
lineNumbers: 'off'
})
} catch (e) {
console.error('Error loading monaco:', e)
@@ -447,7 +447,6 @@
{#if showExpr}
<div class="mt-2 bg-surface-secondary rounded-md pl-4">
<SimpleEditor
yPadding={8}
extraLib={`declare const fields: Record<${propsNames
?.filter((x) => x != name)
.map((x) => `"${x}"`)