@paypal/checkout-components 5.0.413 → 5.0.414
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/dist/button.js +1 -1
- package/dist/test/button.js +1 -1
- package/package.json +2 -2
- package/src/funding/common.jsx +6 -0
- package/src/funding/funding.js +8 -1
- package/src/funding/funding.test.js +69 -0
- package/src/funding/itau/config.jsx +21 -8
- package/src/funding/paylater/config.jsx +7 -12
- package/src/funding/sepa/config.jsx +29 -1
- package/src/marks/component.jsx +4 -0
- package/src/ui/buttons/buttons.jsx +2 -0
- package/src/ui/buttons/config.js +50 -26
- package/src/ui/buttons/poweredBy.jsx +8 -3
- package/src/ui/buttons/props.js +7 -29
- package/src/ui/buttons/props.test.js +0 -42
- package/src/ui/buttons/script.jsx +0 -47
- package/src/ui/buttons/styles/button.js +21 -4
- package/src/ui/buttons/styles/color.js +67 -41
- package/src/ui/buttons/styles/disableMaxHeightConfig.test.js +71 -0
- package/src/ui/buttons/styles/labels.js +23 -0
- package/src/ui/buttons/styles/responsive.js +124 -88
- package/src/ui/buttons/styles/styleUtils.js +9 -7
- package/src/ui/buttons/styles/styleUtils.test.js +23 -76
- package/src/ui/buttons/tagline.jsx +8 -4
- package/src/zoid/buttons/component.jsx +4 -0
|
@@ -16,6 +16,7 @@ export function TagLine({
|
|
|
16
16
|
multiple,
|
|
17
17
|
nonce,
|
|
18
18
|
personalization,
|
|
19
|
+
style,
|
|
19
20
|
}: {|
|
|
20
21
|
fundingSource: $Values<typeof FUNDING>,
|
|
21
22
|
style: ButtonStyle,
|
|
@@ -25,6 +26,7 @@ export function TagLine({
|
|
|
25
26
|
personalization: ?Personalization,
|
|
26
27
|
|}): ?ElementNode {
|
|
27
28
|
const fundingConfig = getFundingConfig()[fundingSource];
|
|
29
|
+
const { shouldApplyRebrandedStyles } = style;
|
|
28
30
|
|
|
29
31
|
if (!fundingConfig) {
|
|
30
32
|
throw new Error(`Can not get config for ${fundingSource}`);
|
|
@@ -39,12 +41,14 @@ export function TagLine({
|
|
|
39
41
|
const tagline = personalization && personalization.tagline;
|
|
40
42
|
|
|
41
43
|
return (
|
|
42
|
-
<div
|
|
44
|
+
<div
|
|
45
|
+
class={`${CLASS.TAGLINE}${
|
|
46
|
+
shouldApplyRebrandedStyles ? ` ${CLASS.BUTTON_REBRAND}` : ""
|
|
47
|
+
}`}
|
|
48
|
+
>
|
|
43
49
|
{tagline ? (
|
|
44
50
|
<Fragment>
|
|
45
|
-
<
|
|
46
|
-
{tagline.Component ? <tagline.Component /> : tagline.text}
|
|
47
|
-
</span>
|
|
51
|
+
{tagline.Component ? <tagline.Component /> : tagline.text}
|
|
48
52
|
{tagline.tracking && tagline.tracking.impression && (
|
|
49
53
|
<TrackingBeacon url={tagline.tracking.impression} nonce={nonce} />
|
|
50
54
|
)}
|
|
@@ -251,6 +251,7 @@ export const getButtonsComponent: () => ButtonsComponent = memoize(() => {
|
|
|
251
251
|
onShippingOptionsChange,
|
|
252
252
|
style = {},
|
|
253
253
|
enableFunding = getEnableFunding(),
|
|
254
|
+
disableFunding = getDisableFunding(),
|
|
254
255
|
fundingEligibility = getRefinedFundingEligibility(),
|
|
255
256
|
supportsPopups = userAgentSupportsPopups(),
|
|
256
257
|
supportedNativeBrowser = isSupportedNativeBrowser(),
|
|
@@ -302,6 +303,7 @@ export const getButtonsComponent: () => ButtonsComponent = memoize(() => {
|
|
|
302
303
|
fundingSource,
|
|
303
304
|
fundingEligibility,
|
|
304
305
|
enableFunding,
|
|
306
|
+
disableFunding,
|
|
305
307
|
components,
|
|
306
308
|
onShippingChange,
|
|
307
309
|
onShippingAddressChange,
|
|
@@ -730,6 +732,7 @@ export const getButtonsComponent: () => ButtonsComponent = memoize(() => {
|
|
|
730
732
|
style = {},
|
|
731
733
|
fundingEligibility = getRefinedFundingEligibility(),
|
|
732
734
|
enableFunding = getEnableFunding(),
|
|
735
|
+
disableFunding = getDisableFunding(),
|
|
733
736
|
experiment = getButtonExperiments(),
|
|
734
737
|
applePaySupport,
|
|
735
738
|
supportsPopups,
|
|
@@ -761,6 +764,7 @@ export const getButtonsComponent: () => ButtonsComponent = memoize(() => {
|
|
|
761
764
|
fundingSource,
|
|
762
765
|
fundingEligibility,
|
|
763
766
|
enableFunding,
|
|
767
|
+
disableFunding,
|
|
764
768
|
experiment,
|
|
765
769
|
components,
|
|
766
770
|
onShippingChange,
|