aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/Amount.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/Amount.svelte
parent8a6108a56c2e5035fd99c39ea13104cf23d98e2d (diff)
downloadcoinos-ui-4bc319a709d27bcdb805294e019d53e25f6e00c5.tar.gz
coinos-ui-4bc319a709d27bcdb805294e019d53e25f6e00c5.zip
fix warnings
Diffstat (limited to 'src/components/Amount.svelte')
-rw-r--r--src/components/Amount.svelte29
1 files changed, 20 insertions, 9 deletions
diff --git a/src/components/Amount.svelte b/src/components/Amount.svelte
index 2df2f702..f59d3c2c 100644
--- a/src/components/Amount.svelte
+++ b/src/components/Amount.svelte
@@ -20,10 +20,15 @@
class="text-2xl md:text-3xl font-semibold flex items-end cursor-copy"
class:justify-center={align !== "left"}
>
- <div class="flex items-center" onclick={() => copy(amount)}>
+ <button
+ type="button"
+ class="flex items-center"
+ onclick={() => copy(amount)}
+ aria-label="Copy amount"
+ >
<iconify-icon noobserver {icon} class="text-yellow-300"
></iconify-icon>{s(amount, locale)}
- </div>
+ </button>
{#if tip}
<div class="flex items-center text-lg ml-2">
@@ -37,14 +42,20 @@
<h3
class="flex text-secondary md:text-lg cursor-copy items-center gap-1"
class:justify-center={align !== "left"}
- onclick={() => copy(toFiat(amount, rate).toFixed(2))}
>
- {f(toFiat(amount, rate), currency, locale)}
- {#if tip}
- <span class="text-base">
- +{f(toFiat(tip, rate), currency, locale)}
- </span>
- {/if}
+ <button
+ type="button"
+ class="flex items-center gap-1"
+ onclick={() => copy(toFiat(amount, rate).toFixed(2))}
+ aria-label="Copy fiat amount"
+ >
+ {f(toFiat(amount, rate), currency, locale)}
+ {#if tip}
+ <span class="text-base">
+ +{f(toFiat(tip, rate), currency, locale)}
+ </span>
+ {/if}
+ </button>
</h3>
</div>
{/if}