feat: added card brand icon and changed location of cvc icon#1586
Conversation
🚫 Missing Linked IssueHi 👋 This pull request does not appear to be linked to any open issue yet. Linking your PR to an issue helps keep the project tidy and ensures the issue is closed automatically. ✔️ How to fix this
Once linked, this check will pass automatically on your next push or when you re-run the workflow. Thanks for helping maintainers! 🙌 |
0910598 to
139ca9f
Compare
🚫 Missing Linked IssueHi 👋 This pull request does not appear to be linked to any open issue yet. Linking your PR to an issue helps keep the project tidy and ensures the issue is closed automatically. ✔️ How to fix this
Once linked, this check will pass automatically on your next push or when you re-run the workflow. Thanks for helping maintainers! 🙌 |
Type of Change
Description
Adds a new
cardBrandIconprop inside thelayoutconfiguration to give merchants control over card brand icon visibility in the card number input. Also movescvcIconfrom the top-leveloptionsobject intolayoutfor a more cohesive icon configuration API.Prop Structure
cardBrandIconValues"standard""hidden""animated""standard""hideDefault"Changes
src/Types/PaymentType.res— Addedtype cardBrandIconStyle = Standard | Hidden | Animated | HideDefault; addedcvcIconandcardBrandIconfields tolayoutConfiganddefaultLayout; removed both from top-leveloptions; added parsers with correct warning paths (options.layout.cvcIcon,options.layout.cardBrandIcon)src/CardUtils.res— AddedgetCardBrandIconVisibility(cardBrandIconSetting, cardType)helper functionsrc/CardSchemeComponent.res— ReadscardBrandIconfrom layout viagetLayoutClass; usesgetCardBrandIconVisibilityto conditionally render the icon; co-badge dropdown is unaffectedsrc/Payments/CardPayment.res— SourcescvcIconfromgetLayoutClass(options.layout).cvcIconsrc/Components/DynamicFields.res— SourcescvcIconfromgetLayoutClass(layout).cvcIconHow did you test it?
Screen.Recording.2026-05-25.at.6.43.08.PM.mov
Checklist
npm run re:build