diff options
| author | Adam Soltys <[email protected]> | 2026-02-03 21:59:24 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-02-11 15:34:18 -0800 |
| commit | 5402ff1ee4dda93b462e06ac5e5b556cec3743c1 (patch) | |
| tree | 9caf7811ea282ade535f351a77bd97f17e8c0c15 /src/components/Amount.svelte | |
| parent | 0a4c48eef92e45e5c12a7b8be321caf165fddb43 (diff) | |
| download | coinos-ui-5402ff1ee4dda93b462e06ac5e5b556cec3743c1.tar.gz coinos-ui-5402ff1ee4dda93b462e06ac5e5b556cec3743c1.zip | |
design tweaks
Diffstat (limited to 'src/components/Amount.svelte')
| -rw-r--r-- | src/components/Amount.svelte | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/src/components/Amount.svelte b/src/components/Amount.svelte index f59d3c2c..e5aeabde 100644 --- a/src/components/Amount.svelte +++ b/src/components/Amount.svelte @@ -9,6 +9,7 @@ rate, currency, locked = false, + showFiat = true, } = $props(); const icon = $derived(locked ? "ph:lock-fill" : "ph:lightning-fill"); @@ -39,23 +40,25 @@ </div> {/if} </h2> - <h3 - class="flex text-secondary md:text-lg cursor-copy items-center gap-1" - class:justify-center={align !== "left"} - > - <button - type="button" - class="flex items-center gap-1" - onclick={() => copy(toFiat(amount, rate).toFixed(2))} - aria-label="Copy fiat amount" + {#if showFiat} + <h3 + class="flex text-secondary md:text-lg cursor-copy items-center gap-1" + class:justify-center={align !== "left"} > - {f(toFiat(amount, rate), currency, locale)} - {#if tip} - <span class="text-base"> - +{f(toFiat(tip, rate), currency, locale)} - </span> - {/if} - </button> - </h3> + <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> + {/if} </div> {/if} |
