Skip to content

Commit e9a40e6

Browse files
committed
feat: add CSS rules for SavedCardItem and CVC input
1 parent 62648aa commit e9a40e6

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

src/Components/PaymentInputField.res

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ let make = (
2424
~paymentType=?,
2525
~isDisabled=false,
2626
~autocomplete="on",
27+
~isSavedCardCVC=false,
2728
) => {
2829
let {themeObj, config} = Recoil.useRecoilValueFromAtom(configAtom)
2930
let {innerLayout} = config.appearance
@@ -81,9 +82,16 @@ let make = (
8182
}
8283
}
8384
let labelClass = getClassName("Label")
84-
let inputClass = getClassName("Input")
85+
let inputClass =
86+
(isSavedCardCVC ? getClassName("Input--saved-cvc") ++ " " : "") ++ getClassName("Input")
87+
8588
let inputLogoClass = getClassName("InputLogo")
86-
let inputClassStyles = innerLayout === Spaced ? "Input" : "Input-Compressed"
89+
let inputClassStyles =
90+
(
91+
isSavedCardCVC
92+
? (innerLayout === Spaced ? "Input--saved-cvc" : "Input-Compressed--saved-cvc") ++ " "
93+
: ""
94+
) ++ (innerLayout === Spaced ? "Input" : "Input-Compressed")
8795

8896
<div className="flex flex-col w-full" style={color: themeObj.colorText}>
8997
<RenderIf

src/Components/SavedCardItem.res

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ let make = (
209209
<div className="flex flex-col items-start mx-8">
210210
<RenderIf condition={isActive && isRenderCvv}>
211211
<div
212-
className={`flex flex-row items-start justify-start gap-2`}
212+
className={`flex flex-row items-start justify-start gap-2 SavedCardItem`}
213213
style={fontSize: "14px", opacity: "0.5"}>
214214
<div className="tracking-widest w-12 mt-6">
215215
{React.string(`${localeString.cvcTextLabel}: `)}
@@ -234,6 +234,7 @@ let make = (
234234
height="1.8rem"
235235
name={TestUtils.cardCVVInputTestId}
236236
autocomplete="cc-csc"
237+
isSavedCardCVC=true
237238
/>
238239
</div>
239240
</div>

0 commit comments

Comments
 (0)