diff options
| author | Adam Soltys <[email protected]> | 2024-11-26 21:45:00 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-11-26 21:45:00 -0800 |
| commit | f4eb6547d0db5edd0137fdefe461433500515040 (patch) | |
| tree | 86a24ca7f263f80f322d59b2e5def5fc6b062719 /src/components/PasswordInput.svelte | |
| parent | 872aa0b3b0b9a847b8afcdee7f1ad53c524ce4f0 (diff) | |
| download | coinos-ui-f4eb6547d0db5edd0137fdefe461433500515040.tar.gz coinos-ui-f4eb6547d0db5edd0137fdefe461433500515040.zip | |
warnings
Diffstat (limited to 'src/components/PasswordInput.svelte')
| -rw-r--r-- | src/components/PasswordInput.svelte | 4 |
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> |
