aboutsummaryrefslogtreecommitdiffstats
path: root/apps/kit/src/routes/book/inputs/+page.svelte
diff options
context:
space:
mode:
authorivarlovlie <git@ivarlovlie.no>2022-09-28 17:05:08 +0200
committerivarlovlie <git@ivarlovlie.no>2022-09-28 17:05:08 +0200
commitf24de70526d6cb20edfc21bf1ded9c7b405a4f3b (patch)
treeb22ec77eb255210a960e1fac020915034bae9366 /apps/kit/src/routes/book/inputs/+page.svelte
parentaa79ab6d0e3699118aae0ffde6b2c19192b544d5 (diff)
downloadgreatoffice-f24de70526d6cb20edfc21bf1ded9c7b405a4f3b.tar.xz
greatoffice-f24de70526d6cb20edfc21bf1ded9c7b405a4f3b.zip
feat: Add input component
Diffstat (limited to 'apps/kit/src/routes/book/inputs/+page.svelte')
-rw-r--r--apps/kit/src/routes/book/inputs/+page.svelte48
1 files changed, 48 insertions, 0 deletions
diff --git a/apps/kit/src/routes/book/inputs/+page.svelte b/apps/kit/src/routes/book/inputs/+page.svelte
new file mode 100644
index 0000000..a693f69
--- /dev/null
+++ b/apps/kit/src/routes/book/inputs/+page.svelte
@@ -0,0 +1,48 @@
+<script lang="ts">
+ import Input from "$lib/components/input.svelte";
+ import { DatabaseIcon } from "$lib/components/icons";
+</script>
+
+<section>
+ <h2>Default</h2>
+ <Input label="Input me" placeholder="Hello" />
+</section>
+
+<section>
+ <h2>With icon</h2>
+ <Input label="Input me" placeholder="Hello" icon={DatabaseIcon} />
+</section>
+
+<section>
+ <h2>With corner hint</h2>
+ <Input label="Input me ->" placeholder="Hello" cornerHint="Hint hint" />
+</section>
+
+<section>
+ <h2>Disabled</h2>
+ <Input label="No" placeholder="Sorry" disabled />
+</section>
+
+<section>
+ <h2>Errored</h2>
+ <Input
+ label="No"
+ placeholder="Sorry"
+ errorText="That's not right"
+ icon={DatabaseIcon}
+ />
+</section>
+
+<section>
+ <h2>Help</h2>
+ <Input label="Go ahead" placeholder="Write here" helpText="Write above" />
+</section>
+<section>
+ <h2>Addon</h2>
+ <Input
+ label="Go ahead"
+ placeholder="Write here"
+ helpText="Write above"
+ addon="To the right"
+ />
+</section>