@paypal/checkout-components 5.0.251 → 5.0.252-alpha.1

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paypal/checkout-components",
3
- "version": "5.0.251",
3
+ "version": "5.0.252-alpha.1",
4
4
  "description": "PayPal Checkout components, for integrating checkout products.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -103,7 +103,7 @@
103
103
  "@paypal/funding-components": "^1.0.30",
104
104
  "@paypal/sdk-client": "^4.0.166",
105
105
  "@paypal/sdk-constants": "^1.0.127",
106
- "@paypal/sdk-logos": "^2.0.2"
106
+ "@paypal/sdk-logos": "^2.2.0-alpha.1"
107
107
  },
108
108
  "lint-staged": {
109
109
  "*.sh": "prettier --write"
@@ -7,6 +7,7 @@ import { Fragment, node } from '@krakenjs/jsx-pragmatic/src';
7
7
  import { BUTTON_LAYOUT } from '../../constants';
8
8
  import { DEFAULT_APM_FUNDING_CONFIG, type FundingSourceConfig, BasicLabel } from '../common';
9
9
  import { Text, Space } from '../../ui/text';
10
+ import { getLogoCDNExperiment } from '../../lib/getLogoCDNExperiment';
10
11
 
11
12
  export function getIdealConfig() : FundingSourceConfig {
12
13
  return {
@@ -18,7 +19,16 @@ export function getIdealConfig() : FundingSourceConfig {
18
19
  BUTTON_LAYOUT.VERTICAL
19
20
  ],
20
21
 
21
- Logo: ({ logoColor, optional }) => IdealLogo({ logoColor, optional }),
22
+ Logo: ({ logoColor, optional }) => {
23
+ if (__WEB__) {
24
+ const logoCDNExperiment = getLogoCDNExperiment();
25
+ const logoCDNExperimentIsEnabled = logoCDNExperiment.isEnabled()
26
+
27
+ return IdealLogo({ logoColor, optional, logoCDNExperimentIsEnabled })
28
+ } else {
29
+ return IdealLogo({ logoColor, optional })
30
+ }
31
+ },
22
32
 
23
33
  Label: ({ logo, ...opts }) => {
24
34
  if (__WEB__) {
@@ -0,0 +1,8 @@
1
+ /* @flow */
2
+
3
+ import { createExperiment } from "@paypal/sdk-client/src";
4
+ import type { Experiment } from "@krakenjs/belter/src";
5
+
6
+ export function getLogoCDNExperiment(): Experiment {
7
+ return createExperiment("enable_logo_cdn", 50);
8
+ }