aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/DeleteItem.svelte
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-11-07 21:16:25 -0800
committerAdam Soltys <[email protected]>2024-11-08 09:27:40 -0800
commit32fcc461cd43c8907df5e306d520bb671307eab1 (patch)
tree0253780c569998b6c1a5f43026586e94916c3fee /src/components/DeleteItem.svelte
parentbe5aa52cea1d57c875cfb22d25c6a866b8de2239 (diff)
downloadcoinos-ui-32fcc461cd43c8907df5e306d520bb671307eab1.tar.gz
coinos-ui-32fcc461cd43c8907df5e306d520bb671307eab1.zip
svelte 5
Diffstat (limited to 'src/components/DeleteItem.svelte')
-rw-r--r--src/components/DeleteItem.svelte10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/components/DeleteItem.svelte b/src/components/DeleteItem.svelte
index 8f7f97ca..d45f09e6 100644
--- a/src/components/DeleteItem.svelte
+++ b/src/components/DeleteItem.svelte
@@ -1,9 +1,11 @@
<script>
+ import { preventDefault } from 'svelte/legacy';
+
import Icon from "$comp/Icon.svelte";
import { fail, post } from "$lib/utils";
import { invalidate } from "$app/navigation";
- export let item;
+ let { item = $bindable() } = $props();
let cancel = () => (item = null);
@@ -25,13 +27,13 @@
class="relative top-1/3 mx-auto p-5 border w-96 shadow-lg rounded-md bg-white space-y-5"
>
<h1 class="text-center text-2xl font-semibold">Delete item</h1>
- <form on:submit|preventDefault={submit}>
+ <form onsubmit={preventDefault(submit)}>
<div class="w-full flex">
<button
type="button"
class="border-2 border-black rounded-xl font-semibold mx-auto py-3 w-40 hover:opacity-80 mx-auto"
- on:click={cancel}
- on:keydown={cancel}
+ onclick={cancel}
+ onkeydown={cancel}
>
<div class="my-auto">No</div>
</button>