From b0c88fe3da32b6db7581b19d00c816eb71c77b00 Mon Sep 17 00:00:00 2001 From: Pritish Budhiraja <1805317@kiit.ac.in> Date: Wed, 13 Mar 2024 00:29:38 +0530 Subject: [PATCH] fix: theme based issue --- src/BrutalTheme.res | 2 +- src/CardTheme.res | 16 ++++++++-------- src/CharcoalTheme.res | 2 +- src/DefaultTheme.res | 2 +- src/MidnightTheme.res | 2 +- src/NoTheme.res | 2 +- src/Payments/CardPayment.res | 2 +- src/SoftTheme.res | 2 +- src/orca-loader/Elements.res | 1 - src/orca-loader/LoaderPaymentElement.res | 7 ------- 10 files changed, 15 insertions(+), 23 deletions(-) diff --git a/src/BrutalTheme.res b/src/BrutalTheme.res index 723960679..c13da8e99 100644 --- a/src/BrutalTheme.res +++ b/src/BrutalTheme.res @@ -40,7 +40,7 @@ let brutal = { spacingGridRow: "20px", buttonBackgroundColor: "#f5fb1f", buttonHeight: "48px", - buttonWidth: "thin", + buttonWidth: "100%", buttonBorderRadius: "6px", buttonBorderColor: "#566186", buttonTextColor: "#000000", diff --git a/src/CardTheme.res b/src/CardTheme.res index bc0e74bff..846c22f00 100644 --- a/src/CardTheme.res +++ b/src/CardTheme.res @@ -255,34 +255,34 @@ let getVariables = (str, dict, default, logger) => { buttonBackgroundColor: getWarningString( json, "buttonBackgroundColor", - default.spacingGridRow, + default.buttonBackgroundColor, ~logger, ), - buttonHeight: getWarningString(json, "buttonHeight", default.spacingGridRow, ~logger), - buttonWidth: getWarningString(json, "buttonWidth", default.spacingGridRow, ~logger), + buttonHeight: getWarningString(json, "buttonHeight", default.buttonHeight, ~logger), + buttonWidth: getWarningString(json, "buttonWidth", default.buttonWidth, ~logger), buttonBorderRadius: getWarningString( json, "buttonBorderRadius", - default.spacingGridRow, + default.buttonBorderRadius, ~logger, ), buttonBorderColor: getWarningString( json, "buttonBorderColor", - default.spacingGridRow, + default.buttonBorderColor, ~logger, ), - buttonTextColor: getWarningString(json, "buttonTextColor", default.spacingGridRow, ~logger), + buttonTextColor: getWarningString(json, "buttonTextColor", default.buttonTextColor, ~logger), buttonTextFontSize: getWarningString( json, "buttonTextFontSize", - default.spacingGridRow, + default.buttonTextFontSize, ~logger, ), buttonTextFontWeight: getWarningString( json, "buttonTextFontWeight", - default.spacingGridRow, + default.buttonTextFontWeight, ~logger, ), } diff --git a/src/CharcoalTheme.res b/src/CharcoalTheme.res index d42347b9f..2711ef31e 100644 --- a/src/CharcoalTheme.res +++ b/src/CharcoalTheme.res @@ -40,7 +40,7 @@ let charcoal = { spacingGridRow: "20px", buttonBackgroundColor: "#000000", buttonHeight: "48px", - buttonWidth: "thin", + buttonWidth: "100%", buttonBorderRadius: "6px", buttonBorderColor: "#000000", buttonTextColor: "#ffffff", diff --git a/src/DefaultTheme.res b/src/DefaultTheme.res index 9077766f3..99dd6bc17 100644 --- a/src/DefaultTheme.res +++ b/src/DefaultTheme.res @@ -40,7 +40,7 @@ let default = { spacingGridRow: "20px", buttonBackgroundColor: "#006df9", buttonHeight: "48px", - buttonWidth: "thin", + buttonWidth: "100%", buttonBorderRadius: "6px", buttonBorderColor: "#ffffff", buttonTextColor: "#ffffff", diff --git a/src/MidnightTheme.res b/src/MidnightTheme.res index b46337934..4b6c1201c 100644 --- a/src/MidnightTheme.res +++ b/src/MidnightTheme.res @@ -40,7 +40,7 @@ let midnight = { spacingGridRow: "20px", buttonBackgroundColor: "#85d996", buttonHeight: "48px", - buttonWidth: "thin", + buttonWidth: "100%", buttonBorderRadius: "6px", buttonBorderColor: "#85d996", buttonTextColor: "#000000", diff --git a/src/NoTheme.res b/src/NoTheme.res index 9f9df6f50..674b7003f 100644 --- a/src/NoTheme.res +++ b/src/NoTheme.res @@ -41,7 +41,7 @@ let nakedValues = { spacingGridRow: "20px", buttonBackgroundColor: "", buttonHeight: "48px", - buttonWidth: "thin", + buttonWidth: "100%", buttonBorderRadius: "6px", buttonBorderColor: "", buttonTextColor: "", diff --git a/src/Payments/CardPayment.res b/src/Payments/CardPayment.res index 30d71d577..ff5515705 100644 --- a/src/Payments/CardPayment.res +++ b/src/Payments/CardPayment.res @@ -273,7 +273,7 @@ let make = ( Js.Array2.length > 0 && + savedMethods->Array.length > 0 && !isBancontact}>
{ open Promise diff --git a/src/orca-loader/LoaderPaymentElement.res b/src/orca-loader/LoaderPaymentElement.res index 359155a91..7826ebb8d 100644 --- a/src/orca-loader/LoaderPaymentElement.res +++ b/src/orca-loader/LoaderPaymentElement.res @@ -22,12 +22,6 @@ let make = (componentType, options, setIframeRef, iframeRef, mountPostMessage) = true, ) - let displaySavedPaymentMethods = - options->getDecodedBoolFromJson( - callbackFuncForExtractingValFromDict("displaySavedPaymentMethods"), - true, - ) - let on = (eventType, eventHandler) => { switch eventType->eventTypeMapper { | Escape => @@ -296,7 +290,6 @@ let make = (componentType, options, setIframeRef, iframeRef, mountPostMessage) = Window.querySelector(`#orca-payment-element-iframeRef-${localSelectorString}`), localSelectorString, sdkHandleOneClickConfirmPayment, - displaySavedPaymentMethods, ) } }