aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/ItemForm.svelte
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-02-03 11:41:09 -0800
committerAdam Soltys <[email protected]>2026-02-11 15:33:27 -0800
commit4bc319a709d27bcdb805294e019d53e25f6e00c5 (patch)
tree2ab903d969946ddd6129f2e6b796368adeef65cd /src/components/ItemForm.svelte
parent8a6108a56c2e5035fd99c39ea13104cf23d98e2d (diff)
downloadcoinos-ui-4bc319a709d27bcdb805294e019d53e25f6e00c5.tar.gz
coinos-ui-4bc319a709d27bcdb805294e019d53e25f6e00c5.zip
fix warnings
Diffstat (limited to 'src/components/ItemForm.svelte')
-rw-r--r--src/components/ItemForm.svelte42
1 files changed, 26 insertions, 16 deletions
diff --git a/src/components/ItemForm.svelte b/src/components/ItemForm.svelte
index d3ea88c0..d92b63a3 100644
--- a/src/components/ItemForm.svelte
+++ b/src/components/ItemForm.svelte
@@ -101,28 +101,38 @@
<div class="grid sm:grid-cols-2 gap-4">
<div class="h-64 rounded-2xl overflow-hidden">
{#if src}
- <img
- {src}
- alt={item.name}
- class="object-cover w-full h-full"
+ <button
+ type="button"
+ class="block w-full h-full"
onclick={select}
- onkeydown={select}
- />
+ aria-label="Select image"
+ >
+ <img
+ {src}
+ alt={item.name}
+ class="object-cover w-full h-full"
+ />
+ </button>
{:else if item.image}
- <img
- src={`/api/public/${item.image}.webp`}
- alt={item.name}
- class="object-cover w-full h-full"
+ <button
+ type="button"
+ class="block w-full h-full"
onclick={select}
- onkeydown={select}
- />
+ aria-label="Select image"
+ >
+ <img
+ src={`/api/public/${item.image}.webp`}
+ alt={item.name}
+ class="object-cover w-full h-full"
+ />
+ </button>
{:else}
- <div
+ <button
+ type="button"
class="bg-gradient-to-r from-primary to-gradient mb-4 cursor-pointer hover:opacity-80 w-full h-full"
onclick={select}
- onkeydown={select}
- alt="Banner"
-></div>
+ aria-label="Select image"
+ ></button>
{/if}
</div>
</div>