@@ -2,10 +2,11 @@ import { PaymentMethodsContainer } from "@commercelayer/react-components"
22import { useTranslation } from "react-i18next"
33
44interface Props {
5+ primaryColor ?: string
56 children : JSX . Element [ ] | JSX . Element
67}
78
8- export const PaymentContainer = ( { children } : Props ) => {
9+ export const PaymentContainer = ( { primaryColor , children } : Props ) => {
910 const { t } = useTranslation ( )
1011
1112 const checkoutReturnUrl = `${
@@ -62,7 +63,7 @@ export const PaymentContainer = ({ children }: Props) => {
6263 input : {
6364 "font-size" : "16px" ,
6465 "font-family" : "monospace" ,
65- padding : "10px " ,
66+ padding : "12px " ,
6667 } ,
6768 } ,
6869 containerClassName : "flex flex-col" ,
@@ -71,7 +72,8 @@ export const PaymentContainer = ({ children }: Props) => {
7172 cardContainerClassName : "grow mb-3 xl:mb-0" ,
7273 expDateContainerClassName : "flex-none w-2/4 xl:mx-3 xl:w-24" ,
7374 cvvContainerClassName : "flex-none w-2/4 pl-3 xl:w-14 xl:pl-0" ,
74- inputWrapperClassName : "h-8 border rounded" ,
75+ inputWrapperClassName :
76+ "h-10 border rounded bg-gray-50 transition duration-300 ease-in-out" ,
7577 fieldLabelClassName : "text-xs text-gray-400" ,
7678 } ,
7779 stripePayment : {
@@ -81,27 +83,64 @@ export const PaymentContainer = ({ children }: Props) => {
8183 "https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap" ,
8284 } ,
8385 ] ,
84- options : {
85- style : {
86- base : {
86+ appearance : {
87+ theme : "stripe" ,
88+ variables : {
89+ colorPrimary : primaryColor ,
90+ fontFamily : "Manrope, sans-serif" ,
91+ fontWeightBold : "700" ,
92+ } ,
93+ rules : {
94+ ".AccordionItem--selected" : {
95+ fontWeight : "var(--fontWeightBold)" ,
8796 color : "#000" ,
88- fontWeight : "400" ,
89- fontSize : "16px" ,
90- fontFamily : "Manrope, sans-serif" ,
91- ":-webkit-autofill" : {
92- color : "#fce883" ,
93- } ,
94- "::placeholder" : {
95- color : "#e0e0e0" ,
96- } ,
9797 } ,
98- invalid : {
99- iconColor : "#FFC7EE" ,
100- color : "#FFC7EE" ,
98+ ".Tab, .Input, .Block, .CheckboxInput, .CodeInput" : {
99+ boxShadow : "0 1px 2px 0 rgba(0, 0, 0, 0.05);" ,
100+ borderColor : "#E6E7E7" ,
101+ } ,
102+ ".Input" : {
103+ backgroundColor : "#f8f8f8" ,
104+ } ,
105+ ".Input:focus" : {
106+ backgroundColor : "#fff" ,
107+ } ,
108+ ".Block" : {
109+ borderColor : "var(--colorPrimary)" ,
110+ } ,
111+ ".BlockDivider" : {
112+ backgroundColor : "#ebebeb" ,
113+ } ,
114+ ".Tab, .Tab:hover, .Tab:focus" : {
115+ border : "0" ,
116+ } ,
117+ ".Tab--selected, .Tab--selected:hover" : {
118+ backgroundColor : "#f360a6" ,
119+ color : "#fff" ,
101120 } ,
102121 } ,
103- hideIcon : false ,
104- hidePostalCode : true ,
122+ } ,
123+ options : {
124+ // style: {
125+ // base: {
126+ // color: "#000",
127+ // fontWeight: "400",
128+ // fontSize: "16px",
129+ // fontFamily: "Manrope, sans-serif",
130+ // ":-webkit-autofill": {
131+ // color: "#fce883",
132+ // },
133+ // "::placeholder": {
134+ // color: "#e0e0e0",
135+ // },
136+ // },
137+ // invalid: {
138+ // iconColor: "#FFC7EE",
139+ // color: "#FFC7EE",
140+ // },
141+ // },
142+ // hideIcon: false,
143+ // hidePostalCode: true,
105144 } ,
106145 } ,
107146 wireTransfer : {
0 commit comments