From 380da842ffdb597eebb88f217f89a9268cbfaf6a Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 28 Nov 2024 08:04:46 -0800 Subject: currency locale --- src/components/Amount.svelte | 52 ++++++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 24 deletions(-) (limited to 'src/components/Amount.svelte') diff --git a/src/components/Amount.svelte b/src/components/Amount.svelte index de432400..46aa2d1b 100644 --- a/src/components/Amount.svelte +++ b/src/components/Amount.svelte @@ -1,31 +1,35 @@ -
-

-
- {s(amount)} -
- - {#if tip} -
-
+
+{#if amount} +
+

+
-
{s(tip)}
+ >{s(amount)}
- {/if} -

-

- {f(toFiat(amount, rate), currency)} - {#if tip} - - + {f(toFiat(tip, rate), currency)} - - {/if} -

-
+ + {#if tip} +
+
+
+ +
{s(tip)}
+
+ {/if} +

+

+ {f(toFiat(amount, rate), currency, locale)} + {#if tip} + + + {f(toFiat(tip, rate), currency, locale)} + + {/if} +

+
+{/if} -- cgit v1.2.3