From b7e39b59fd0fc7b5610ebff29035bf622079e0d8 Mon Sep 17 00:00:00 2001
From: ivarlovlie <git@ivarlovlie.no>
Date: Wed, 5 Oct 2022 20:45:21 +0800
Subject: refactor: Change file structure

---
 .../web-shared/src/components/form/textarea.svelte | 48 ----------------------
 1 file changed, 48 deletions(-)
 delete mode 100644 old-apps/web-shared/src/components/form/textarea.svelte

(limited to 'old-apps/web-shared/src/components/form/textarea.svelte')

diff --git a/old-apps/web-shared/src/components/form/textarea.svelte b/old-apps/web-shared/src/components/form/textarea.svelte
deleted file mode 100644
index b313d2e..0000000
--- a/old-apps/web-shared/src/components/form/textarea.svelte
+++ /dev/null
@@ -1,48 +0,0 @@
-<script lang="ts">
-    export let id;
-    export let disabled = false;
-    export let loading = false;
-    export let rows = 2;
-    export let cols = 0;
-    export let name;
-    export let placeholder;
-    export let value;
-    export let label;
-    export let errorText;
-
-    $: shared_props = {
-        rows: rows || null,
-        cols: cols || null,
-        name: name || null,
-        id: id || null,
-        disabled: disabled || null,
-        class: [`form-control ${loading ? "c-disabled loading" : ""}`, $$restProps.class ?? ""].filter(Boolean).join(" "),
-    };
-
-    let textarea;
-    let scrollHeight = 0;
-
-    $:if (textarea) {
-        scrollHeight = textarea.scrollHeight;
-    }
-
-    function on_input(event) {
-        event.target.style.height = "auto";
-        event.target.style.height = (this.scrollHeight) + "px";
-    }
-</script>
-
-{#if label}
-    <label for="{id}"
-           class="form-label margin-bottom-xxs">{label}</label>
-{/if}
-<textarea {...shared_props}
-          {placeholder}
-          style="overflow-y:hidden;min-height:calc(1.5em + .75rem + 2px);{scrollHeight ? 'height:{scrollHeight}px' : ''};"
-          bind:value={value}
-          bind:this={textarea}
-          on:input={on_input}
-></textarea>
-{#if errorText}
-    <small class="color-error">{errorText}</small>
-{/if}
-- 
cgit v1.3

