From f24de70526d6cb20edfc21bf1ded9c7b405a4f3b Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Wed, 28 Sep 2022 23:05:08 +0800 Subject: feat: Add input component --- apps/kit/src/lib/components/input.svelte | 121 +++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 apps/kit/src/lib/components/input.svelte (limited to 'apps/kit/src/lib/components/input.svelte') diff --git a/apps/kit/src/lib/components/input.svelte b/apps/kit/src/lib/components/input.svelte new file mode 100644 index 0000000..0847f3e --- /dev/null +++ b/apps/kit/src/lib/components/input.svelte @@ -0,0 +1,121 @@ + + +
+ {#if label && !cornerHint && !hideLabel} + + {:else if cornerHint && !hideLabel} +
+ {#if label} + + {/if} + + {cornerHint} + +
+ {/if} +
+ {#if icon} +
+ +
+ {:else if addon} +
+ {addon} +
+ {/if} + + {#if errorText} +
+ +
+ {/if} +
+ {#if helpText && !errorText} +

+ {helpText} +

+ {/if} + {#if errorText} +

+ {errorText} +

+ {/if} +
-- cgit v1.3