From c213cfa8ba8371537b9124d0d792b9eb9b2bf5f6 Mon Sep 17 00:00:00 2001
From: EETagent
Date: Mon, 21 Nov 2022 12:57:33 +0100
Subject: [PATCH] feat: add icon to textfield
---
.../lib/components/textfield/TextField.svelte | 36 ++++++++++++-------
frontend/src/routes/register/+page.svelte | 13 +++++--
2 files changed, 34 insertions(+), 15 deletions(-)
diff --git a/frontend/src/lib/components/textfield/TextField.svelte b/frontend/src/lib/components/textfield/TextField.svelte
index 3daa00e..078b751 100644
--- a/frontend/src/lib/components/textfield/TextField.svelte
+++ b/frontend/src/lib/components/textfield/TextField.svelte
@@ -2,21 +2,33 @@
export let type: 'text' | 'number' | 'tel' | 'e-mail' = 'text';
const typeAction = (node: HTMLInputElement) => {
node.type = type;
- }
+ };
export let placeholder: string = '';
export let value: string = '';
+
+ export let icon: boolean = false;
-
+
+
+ {#if icon}
+
+
+
+ {/if}
+
\ No newline at end of file
+ .withIcon {
+ @apply pr-14;
+ }
+
diff --git a/frontend/src/routes/register/+page.svelte b/frontend/src/routes/register/+page.svelte
index 81eb3a9..f3602c7 100644
--- a/frontend/src/routes/register/+page.svelte
+++ b/frontend/src/routes/register/+page.svelte
@@ -14,7 +14,7 @@
}
};
- let pageIndex = 3;
+ let pageIndex = 0;
@@ -31,7 +31,10 @@
@@ -89,7 +92,11 @@
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Fusce suscipit libero eget elit.