@paypal/checkout-components 5.0.332 → 5.0.334
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -109,11 +109,15 @@ export function Button({
|
|
|
109
109
|
|
|
110
110
|
let { color, period, label } = style;
|
|
111
111
|
|
|
112
|
-
// if no color option is passed in via style props
|
|
112
|
+
// if no color option is passed in via style props
|
|
113
113
|
if (color === "" || typeof color === "undefined") {
|
|
114
|
-
color
|
|
114
|
+
// if multiple buttons are being rendered (smart stack), we set default color as gold
|
|
115
|
+
// if a single button is rendered, we set color to first option in the fundingSource config
|
|
116
|
+
color = multiple ? "gold" : colors[0];
|
|
115
117
|
}
|
|
116
118
|
|
|
119
|
+
// The secondary colors are used to render the smart stack (multiple buttons)
|
|
120
|
+
// they keep track of the mapping of the color style prop to the
|
|
117
121
|
if (multiple && i > 0) {
|
|
118
122
|
if (
|
|
119
123
|
secondaryColors[color] &&
|
|
@@ -119,6 +119,18 @@ export function getCardFormComponent(): CardFormComponent {
|
|
|
119
119
|
value: getLocale,
|
|
120
120
|
},
|
|
121
121
|
|
|
122
|
+
country: {
|
|
123
|
+
type: "object",
|
|
124
|
+
queryParam: "country.x",
|
|
125
|
+
allowDelegate: true,
|
|
126
|
+
queryValue({ value }): string {
|
|
127
|
+
// $FlowFixMe
|
|
128
|
+
const { country } = value;
|
|
129
|
+
return country;
|
|
130
|
+
},
|
|
131
|
+
value: getLocale,
|
|
132
|
+
},
|
|
133
|
+
|
|
122
134
|
onApprove: {
|
|
123
135
|
type: "function",
|
|
124
136
|
alias: "onAuthorize",
|
|
@@ -195,6 +195,17 @@ export function getCheckoutComponent(): CheckoutComponent {
|
|
|
195
195
|
value: getLocale,
|
|
196
196
|
},
|
|
197
197
|
|
|
198
|
+
country: {
|
|
199
|
+
type: "object",
|
|
200
|
+
queryParam: "country.x",
|
|
201
|
+
allowDelegate: true,
|
|
202
|
+
queryValue({ value }): string {
|
|
203
|
+
const { country } = value;
|
|
204
|
+
return country;
|
|
205
|
+
},
|
|
206
|
+
value: getLocale,
|
|
207
|
+
},
|
|
208
|
+
|
|
198
209
|
createOrder: {
|
|
199
210
|
type: "function",
|
|
200
211
|
queryParam: "token",
|