diff options
| author | Adam Soltys <[email protected]> | 2026-03-02 22:37:05 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-03-02 22:37:05 -0800 |
| commit | 11d358ad0412b794ecf89b4da9f99ac41ed9c3fe (patch) | |
| tree | 61808f5d31df326ad7c3d459e16d4f6085368ad0 /src/components/PasswordInput.svelte | |
| parent | c0da099aa48f6bbc168159293bfae9e60daffeda (diff) | |
| download | coinos-ui-11d358ad0412b794ecf89b4da9f99ac41ed9c3fe.tar.gz coinos-ui-11d358ad0412b794ecf89b4da9f99ac41ed9c3fe.zip | |
inline icons
Diffstat (limited to 'src/components/PasswordInput.svelte')
| -rw-r--r-- | src/components/PasswordInput.svelte | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/components/PasswordInput.svelte b/src/components/PasswordInput.svelte index 8d16aad6..8901fa27 100644 --- a/src/components/PasswordInput.svelte +++ b/src/components/PasswordInput.svelte @@ -1,4 +1,6 @@ <script lang="ts"> + import PhEyeBold from "virtual:icons/ph/eye-bold"; + import PhEyeSlashBold from "virtual:icons/ph/eye-slash-bold"; let { name = $bindable("password"), show = $bindable(), @@ -11,8 +13,6 @@ e?.preventDefault(); show = !show; }; - - let icon = $derived(show ? "ph:eye-bold" : "ph:eye-slash-bold"); </script> <label for="password" class="input flex items-center justify-center gap-2 w-full"> @@ -22,6 +22,10 @@ <input {name} type="password" bind:value class="clean" use:focus {placeholder} /> {/if} <button type="button" aria-label="Toggle" onclick={toggle} class="contents"> - <iconify-icon noobserver {icon} width="32"></iconify-icon> + {#if show} + <PhEyeBold width="32" /> + {:else} + <PhEyeSlashBold width="32" /> + {/if} </button> </label> |
