From 11bf25d7fc5c8ad1f8184e2b93e97892729ed35f Mon Sep 17 00:00:00 2001 From: Aimen Sahnoun Date: Thu, 7 Nov 2024 12:23:10 +0300 Subject: [PATCH 1/2] feat: improve UI of payment-widget --- .../src/lib/payment-widget.svelte | 408 +++++++++--------- .../src/lib/react/PaymentWidget.d.ts | 2 +- shared/icons/rn-logo-white.svelte | 20 + 3 files changed, 214 insertions(+), 216 deletions(-) create mode 100644 shared/icons/rn-logo-white.svelte diff --git a/packages/payment-widget/src/lib/payment-widget.svelte b/packages/payment-widget/src/lib/payment-widget.svelte index 2250ca8c..25dc2d47 100644 --- a/packages/payment-widget/src/lib/payment-widget.svelte +++ b/packages/payment-widget/src/lib/payment-widget.svelte @@ -2,7 +2,7 @@
-
- {#if sellerInfo?.logo || sellerInfo?.name} -
- {#if sellerInfo.logo} - Seller logo - {/if} -

{sellerInfo.name}

-
- {/if} - - {#if productInfo?.name || productInfo?.description || productInfo?.image} -
-
-

{productInfo?.name}

- {productInfo?.description} + {#if sellerInfo?.logo || sellerInfo?.name || productInfo?.name || productInfo?.description || productInfo?.image || (!hideTotalAmount && amountInUSD)} +
+ + {#if sellerInfo?.logo || sellerInfo?.name} +
+ {#if sellerInfo.logo} + Seller logo + {/if} + {sellerInfo.name}
- {#if productInfo.image} - Product - {/if} -
- {/if} - -
- TOTAL - {amountInUSD} USD + {/if} + + + {#if productInfo?.name || productInfo?.description || productInfo?.image} +
+
+ {#if productInfo?.name} +

{productInfo.name}

+ {/if} + {#if productInfo?.description} +

{productInfo.description}

+ {/if} +
+ {#if productInfo?.image} + Product + {/if} +
+ {/if} + + + {#if !hideTotalAmount && amountInUSD} +
+ TOTAL + {amountInUSD} USD +
+ {/if}
-
- -
-

Pay with crypto

- -
- { - isModalOpen = false; + {/if} + +
-{#if showRNBranding} -
- -
-{/if} + + { + isModalOpen = false; + }} +> + {#if currentPaymentStep === "currency"} + + {:else if currentPaymentStep === "buyer-info"} + + {:else if selectedCurrency && currentPaymentStep === "confirmation"} + + {:else} + + {/if} +