blob: 8b5810965d41dc557368bcc25cf828d79fade7c1 (
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
<script>
import Numpad from "$comp/Numpad.svelte";
import Toggle from "$comp/Toggle.svelte";
export let currency,
rate,
fiat,
submit,
settingAmount,
setAmount,
newAmount,
toggleAmount,
t,
amountPrompt;
</script>
{#if settingAmount}
<div
class="fixed inset-0 bg-base-100 bg-opacity-90 overflow-y-auto h-full w-full z-50"
>
<div
class="relative mx-auto p-12 max-w-xl shadow-lg rounded-md bg-base-100 space-y-5"
>
<form on:submit|preventDefault={setAmount} class="space-y-5">
<Numpad
bind:amount={newAmount}
bind:currency
bind:rate
bind:fiat
bind:submit
/>
<div class="w-full flex flex-wrap gap-2">
<button
bind:this={submit}
type="submit"
on:click={setAmount}
class="btn"
>
<div class="my-auto">{t("payments.ok")}</div>
</button>
<button
type="button"
class="btn"
on:click={toggleAmount}
on:keydown={toggleAmount}
>
<div class="my-auto">{t("payments.cancel")}</div>
</button>
</div>
</form>
<div class="flex justify-center gap-3">
<div class="text-secondary">{t("payments.amountPrompt")}</div>
<Toggle id="notify" bind:value={amountPrompt} />
</div>
</div>
</div>
{/if}
|