diff options
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/PasswordInput.svelte | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/components/PasswordInput.svelte b/src/components/PasswordInput.svelte index 483b473d..860899c2 100644 --- a/src/components/PasswordInput.svelte +++ b/src/components/PasswordInput.svelte @@ -6,7 +6,12 @@ focus = () => {}, placeholder, } = $props(); - let toggle = (e) => (show = !show); + + let toggle = (e) => { + e.preventDefault(); + show = !show; + }; + let icon = $derived(show ? "ph:eye-bold" : "ph:eye-slash-bold"); </script> |
