diff options
| author | Adam Soltys <[email protected]> | 2024-11-07 21:16:25 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-11-08 09:27:40 -0800 |
| commit | 32fcc461cd43c8907df5e306d520bb671307eab1 (patch) | |
| tree | 0253780c569998b6c1a5f43026586e94916c3fee /src/components/WalletPass.svelte | |
| parent | be5aa52cea1d57c875cfb22d25c6a866b8de2239 (diff) | |
| download | coinos-ui-32fcc461cd43c8907df5e306d520bb671307eab1.tar.gz coinos-ui-32fcc461cd43c8907df5e306d520bb671307eab1.zip | |
svelte 5
Diffstat (limited to 'src/components/WalletPass.svelte')
| -rw-r--r-- | src/components/WalletPass.svelte | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/components/WalletPass.svelte b/src/components/WalletPass.svelte index 75c94f34..57cf69c3 100644 --- a/src/components/WalletPass.svelte +++ b/src/components/WalletPass.svelte @@ -1,9 +1,11 @@ <script> + import { preventDefault } from 'svelte/legacy'; + import { focus } from "$lib/utils"; import { t } from "$lib/translations"; import Icon from "$comp/Icon.svelte"; - export let cancel, password, submit; - let revealPassword; + let { cancel, password = $bindable(), submit } = $props(); + let revealPassword = $state(); </script> <div @@ -15,7 +17,7 @@ <h1 class="text-center text-2xl font-semibold"> {$t("payments.enterWalletPass")} </h1> - <form on:submit|preventDefault={submit}> + <form onsubmit={preventDefault(submit)}> <div class="relative mb-5"> {#if revealPassword} <input @@ -38,7 +40,7 @@ {/if} <button type="button" - on:click={() => (revealPassword = !revealPassword)} + onclick={() => (revealPassword = !revealPassword)} class="absolute right-5 top-1/2" > <Icon icon={revealPassword ? "eye" : "eye-off"} /> @@ -48,8 +50,8 @@ <button type="button" class="border rounded-2xl font-semibold mx-auto py-5 px-6 hover:opacity-80 mx-auto grow" - on:click={cancel} - on:keydown={cancel} + onclick={cancel} + onkeydown={cancel} > <div class="my-auto">Cancel</div> </button> |
