Skip to content

Commit

Permalink
fix: theme based issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Pritish Budhiraja committed Mar 12, 2024
1 parent ab53eaf commit b0c88fe
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/BrutalTheme.res
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ let brutal = {
spacingGridRow: "20px",
buttonBackgroundColor: "#f5fb1f",
buttonHeight: "48px",
buttonWidth: "thin",
buttonWidth: "100%",
buttonBorderRadius: "6px",
buttonBorderColor: "#566186",
buttonTextColor: "#000000",
Expand Down
16 changes: 8 additions & 8 deletions src/CardTheme.res
Original file line number Diff line number Diff line change
Expand Up @@ -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,
),
}
Expand Down
2 changes: 1 addition & 1 deletion src/CharcoalTheme.res
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ let charcoal = {
spacingGridRow: "20px",
buttonBackgroundColor: "#000000",
buttonHeight: "48px",
buttonWidth: "thin",
buttonWidth: "100%",
buttonBorderRadius: "6px",
buttonBorderColor: "#000000",
buttonTextColor: "#ffffff",
Expand Down
2 changes: 1 addition & 1 deletion src/DefaultTheme.res
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ let default = {
spacingGridRow: "20px",
buttonBackgroundColor: "#006df9",
buttonHeight: "48px",
buttonWidth: "thin",
buttonWidth: "100%",
buttonBorderRadius: "6px",
buttonBorderColor: "#ffffff",
buttonTextColor: "#ffffff",
Expand Down
2 changes: 1 addition & 1 deletion src/MidnightTheme.res
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ let midnight = {
spacingGridRow: "20px",
buttonBackgroundColor: "#85d996",
buttonHeight: "48px",
buttonWidth: "thin",
buttonWidth: "100%",
buttonBorderRadius: "6px",
buttonBorderColor: "#85d996",
buttonTextColor: "#000000",
Expand Down
2 changes: 1 addition & 1 deletion src/NoTheme.res
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ let nakedValues = {
spacingGridRow: "20px",
buttonBackgroundColor: "",
buttonHeight: "48px",
buttonWidth: "thin",
buttonWidth: "100%",
buttonBorderRadius: "6px",
buttonBorderColor: "",
buttonTextColor: "",
Expand Down
2 changes: 1 addition & 1 deletion src/Payments/CardPayment.res
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ let make = (
</RenderIf>
<RenderIf
condition={options.displaySavedPaymentMethods &&
savedMethods->Js.Array2.length > 0 &&
savedMethods->Array.length > 0 &&
!isBancontact}>
<div
className="Label flex flex-row gap-3 items-end cursor-pointer"
Expand Down
2 changes: 1 addition & 1 deletion src/SoftTheme.res
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ let soft = {
spacingGridRow: "20px",
buttonBackgroundColor: "#3c3d3e",
buttonHeight: "48px",
buttonWidth: "thin",
buttonWidth: "100%",
buttonBorderRadius: "6px",
buttonBorderColor: "#7d8fff",
buttonTextColor: "#7d8fff",
Expand Down
1 change: 0 additions & 1 deletion src/orca-loader/Elements.res
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ let make = (
mountedIframeRef,
selectorString,
sdkHandleOneClickConfirmPayment,
displaySavedPaymentMethods,
) => {
open Promise

Expand Down
7 changes: 0 additions & 7 deletions src/orca-loader/LoaderPaymentElement.res
Original file line number Diff line number Diff line change
Expand Up @@ -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 =>
Expand Down Expand Up @@ -296,7 +290,6 @@ let make = (componentType, options, setIframeRef, iframeRef, mountPostMessage) =
Window.querySelector(`#orca-payment-element-iframeRef-${localSelectorString}`),
localSelectorString,
sdkHandleOneClickConfirmPayment,
displaySavedPaymentMethods,
)
}
}
Expand Down

0 comments on commit b0c88fe

Please sign in to comment.