From 42ae1de2df1a5ee3463f66fcf8ac7de02aa256a7 Mon Sep 17 00:00:00 2001 From: Pyrofab Date: Thu, 4 Apr 2024 00:39:21 +0200 Subject: [PATCH] Fix MC text input styling --- svelte_sprinkles/src/lib/McTextInput.svelte | 8 ++++---- svelte_sprinkles/src/lib/ResizingInput.svelte | 19 +++++++++++-------- .../editor/state/StateTextInput.svelte | 3 --- .../state/choice/DialogueStateChoices.svelte | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/svelte_sprinkles/src/lib/McTextInput.svelte b/svelte_sprinkles/src/lib/McTextInput.svelte index e1d595f7..b13a88cb 100644 --- a/svelte_sprinkles/src/lib/McTextInput.svelte +++ b/svelte_sprinkles/src/lib/McTextInput.svelte @@ -10,9 +10,8 @@ }>(); export let id: string | undefined = undefined; - let className: string | undefined = undefined; - // noinspection ReservedWordAsName - export {className as class}; + export let inputClass: string | undefined = undefined; + export let containerClass: string | undefined = undefined; export let placeholders: Record | undefined = undefined; export let value: McText = ''; export let textFormat: McTextType = $dialogueTextFormat; @@ -50,7 +49,8 @@ } = () => {}; $: minHeight = `${1 + minRows * 1.2}em`; $: maxHeight = maxRows ? `${1 + maxRows * 1.2}em` : `auto`; -
+
{#if maxRows === undefined || maxRows > 1} - + {:else} - + {/if}
diff --git a/svelte_sprinkles/src/sprinkles/parlour/editor/state/StateTextInput.svelte b/svelte_sprinkles/src/sprinkles/parlour/editor/state/StateTextInput.svelte index 85ff780f..a7386d99 100644 --- a/svelte_sprinkles/src/sprinkles/parlour/editor/state/StateTextInput.svelte +++ b/svelte_sprinkles/src/sprinkles/parlour/editor/state/StateTextInput.svelte @@ -34,7 +34,4 @@
diff --git a/svelte_sprinkles/src/sprinkles/parlour/editor/state/choice/DialogueStateChoices.svelte b/svelte_sprinkles/src/sprinkles/parlour/editor/state/choice/DialogueStateChoices.svelte index cf3d5e20..affa459e 100644 --- a/svelte_sprinkles/src/sprinkles/parlour/editor/state/choice/DialogueStateChoices.svelte +++ b/svelte_sprinkles/src/sprinkles/parlour/editor/state/choice/DialogueStateChoices.svelte @@ -104,7 +104,7 @@