Skip to content

Commit 4a3a827

Browse files
committed
set ab test color in zoid props
1 parent cbd5215 commit 4a3a827

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Diff for: src/funding/paypal/config.jsx

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ export function getPayPalConfig(): FundingSourceConfig {
3333
BUTTON_COLOR.SILVER,
3434
BUTTON_COLOR.BLACK,
3535
BUTTON_COLOR.WHITE,
36+
BUTTON_COLOR.DEFAULT_BLUE_LIGHT_BLUE,
37+
BUTTON_COLOR.DEFAULT_BLUE_DARK_BLUE,
3638
],
3739

3840
logoColors: {

Diff for: src/ui/buttons/props.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,8 @@ export function normalizeButtonStyle(
648648
}
649649

650650
props = props || getDefaultButtonPropsInput();
651-
const { fundingSource } = props;
651+
const { fundingSource, experiment } = props;
652+
const { isPaypalRebrandEnabled, defaultBlueButtonColor } = experiment;
652653

653654
const FUNDING_CONFIG = getFundingConfig();
654655
const fundingConfig =
@@ -677,6 +678,12 @@ export function normalizeButtonStyle(
677678
borderRadius,
678679
} = style;
679680

681+
const isColorUnset = color === "" || color === undefined;
682+
683+
if (isPaypalRebrandEnabled && isColorUnset) {
684+
color = defaultBlueButtonColor;
685+
}
686+
680687
// $FlowFixMe
681688
if (tagline === "false") {
682689
// $FlowFixMe

0 commit comments

Comments
 (0)