aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/PasswordInput.svelte
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-11-26 21:45:00 -0800
committerAdam Soltys <[email protected]>2024-11-26 21:45:00 -0800
commitf4eb6547d0db5edd0137fdefe461433500515040 (patch)
tree86a24ca7f263f80f322d59b2e5def5fc6b062719 /src/components/PasswordInput.svelte
parent872aa0b3b0b9a847b8afcdee7f1ad53c524ce4f0 (diff)
downloadcoinos-ui-f4eb6547d0db5edd0137fdefe461433500515040.tar.gz
coinos-ui-f4eb6547d0db5edd0137fdefe461433500515040.zip
warnings
Diffstat (limited to 'src/components/PasswordInput.svelte')
-rw-r--r--src/components/PasswordInput.svelte4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/components/PasswordInput.svelte b/src/components/PasswordInput.svelte
index 5885304b..bac00134 100644
--- a/src/components/PasswordInput.svelte
+++ b/src/components/PasswordInput.svelte
@@ -1,5 +1,5 @@
<script>
- let { value = $bindable() } = $props();
+ let { value = $bindable(), focus = () => {} } = $props();
let toggle = (e) => (show = !show);
let show = $state(false);
let icon = $derived(show ? "ph:eye-bold" : "ph:eye-slash-bold");
@@ -12,7 +12,7 @@
{#if show}
<input name="password" type="text" bind:value class="clean" />
{:else}
- <input name="password" type="password" bind:value class="clean" />
+ <input name="password" type="password" bind:value class="clean" use:focus />
{/if}
<button type="button" aria-label="Toggle" onclick={toggle} class="contents">
<iconify-icon {icon} width="32"></iconify-icon>