diff options
Diffstat (limited to 'src/components/Amount.svelte')
| -rw-r--r-- | src/components/Amount.svelte | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/components/Amount.svelte b/src/components/Amount.svelte index 035152d1..7efafca8 100644 --- a/src/components/Amount.svelte +++ b/src/components/Amount.svelte @@ -1,13 +1,14 @@ <script> import { s, f, toFiat } from "$lib/utils"; import { fiat } from "$lib/store"; - const { amount, locale, tip, rate, currency } = $props(); + const { align, amount, locale, tip, rate, currency } = $props(); </script> {#if amount} <div> <h2 - class="text-2xl md:text-3xl font-semibold flex justify-center items-end" + class="text-2xl md:text-3xl font-semibold flex items-end" + class:justify-center={align !== "left"} > <div class="flex items-center"> <iconify-icon icon="ph:lightning-fill" class="text-yellow-300" @@ -23,7 +24,10 @@ </div> {/if} </h2> - <h3 class="flex text-secondary md:text-lg justify-center"> + <h3 + class="flex text-secondary md:text-lg" + class:justify-center={align !== "left"} + > {f(toFiat(amount, rate), currency, locale)} {#if tip} <span class="text-base"> |
