Skip to content

Commit

Permalink
fix: styling issues
Browse files Browse the repository at this point in the history
  • Loading branch information
PritishBudhiraja committed Sep 25, 2024
1 parent 00f2261 commit ac13387
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
6 changes: 1 addition & 5 deletions src/Components/DynamicFields.res
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,6 @@ let make = (
(dynamicFieldsToRenderInsideBilling->Array.length > 1 || !isOnlyInfoElementPresent)

let spacedStylesForBiilingDetails = isSpacedInnerLayout ? "p-2" : "my-2"
let spacedStylesForCity = isSpacedInnerLayout ? "p-2" : ""

<RenderIf condition={fieldsArr->Array.length > 0}>
{<>
Expand Down Expand Up @@ -510,10 +509,7 @@ let make = (
}>
{React.string(localeString.billingDetailsText)}
</div>
<div
className={`${spacedStylesForCity} flex flex-col ${isSpacedInnerLayout
? "gap-2"
: ""}`}>
<div className={`flex flex-col ${isSpacedInnerLayout ? "gap-2" : ""}`}>
{dynamicFieldsToRenderInsideBilling
->Array.mapWithIndex((item, index) => {
<div
Expand Down
42 changes: 23 additions & 19 deletions src/Components/SavedMethods.res
Original file line number Diff line number Diff line change
Expand Up @@ -46,24 +46,24 @@ let make = (
let {paymentToken: paymentTokenVal, customerId} = paymentToken

let bottomElement = {
savedMethods
->Array.mapWithIndex((obj, i) => {
let brandIcon = obj->getPaymentMethodBrand
let isActive = paymentTokenVal == obj.paymentToken
<SavedCardItem
key={i->Int.toString}
setPaymentToken
isActive
paymentItem=obj
brandIcon
index=i
savedCardlength
cvcProps
paymentType
setRequiredFieldsBody
/>
})
->React.array
<div className="PickerItemContainer">
{savedMethods
->Array.mapWithIndex((obj, i) =>
<SavedCardItem
key={i->Int.toString}
setPaymentToken
isActive={paymentTokenVal == obj.paymentToken}
paymentItem=obj
brandIcon={obj->getPaymentMethodBrand}
index=i
savedCardlength
cvcProps
paymentType
setRequiredFieldsBody
/>
)
->React.array}
</div>
}

let (isCVCValid, _, cvcNumber, _, _, _, _, _, _, setCvcError) = cvcProps
Expand Down Expand Up @@ -160,7 +160,11 @@ let make = (
| Some("apple_pay") =>
switch applePayToken {
| ApplePayTokenOptional(optToken) =>
ApplePayHelpers.handleApplePayButtonClicked(~sessionObj=optToken, ~componentName, ~paymentMethodListValue)
ApplePayHelpers.handleApplePayButtonClicked(
~sessionObj=optToken,
~componentName,
~paymentMethodListValue,
)
| _ =>
// TODO - To be replaced with proper error message
intent(
Expand Down

0 comments on commit ac13387

Please sign in to comment.