blob: de4324004f1e02cdec9ec25d3c1b328dfecfcf17 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
<script>
import { s, f, toFiat } from "$lib/utils";
import { fiat } from "$lib/store";
const { amount, tip, rate, currency } = $props();
</script>
<div>
<h2 class="text-2xl md:text-3xl font-semibold flex justify-center items-end">
<div class="flex items-center">
<iconify-icon icon="ph:lightning-fill" class="text-yellow-300"
></iconify-icon>{s(amount)}
</div>
{#if tip}
<div class="flex items-center text-lg ml-2">
<div>+</div>
<iconify-icon icon="ph:lightning-fill" class="text-yellow-300"
></iconify-icon>
<div>{s(tip)}</div>
</div>
{/if}
</h2>
<h3 class="text-secondary md:text-lg">
{f(toFiat(amount, rate), currency)}
{#if tip}
<span class="text-base">
+ {f(toFiat(tip, rate), currency)}
</span>
{/if}
</h3>
</div>
|