Skip to content

Commit

Permalink
set ab test color in zoid props
Browse files Browse the repository at this point in the history
  • Loading branch information
nikrom17 committed Feb 3, 2025
1 parent cbd5215 commit 4a3a827
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/funding/paypal/config.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ export function getPayPalConfig(): FundingSourceConfig {
BUTTON_COLOR.SILVER,
BUTTON_COLOR.BLACK,
BUTTON_COLOR.WHITE,
BUTTON_COLOR.DEFAULT_BLUE_LIGHT_BLUE,
BUTTON_COLOR.DEFAULT_BLUE_DARK_BLUE,
],

logoColors: {
Expand Down
9 changes: 8 additions & 1 deletion src/ui/buttons/props.js
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,8 @@ export function normalizeButtonStyle(
}

props = props || getDefaultButtonPropsInput();
const { fundingSource } = props;
const { fundingSource, experiment } = props;
const { isPaypalRebrandEnabled, defaultBlueButtonColor } = experiment;

const FUNDING_CONFIG = getFundingConfig();
const fundingConfig =
Expand Down Expand Up @@ -677,6 +678,12 @@ export function normalizeButtonStyle(
borderRadius,
} = style;

const isColorUnset = color === "" || color === undefined;

if (isPaypalRebrandEnabled && isColorUnset) {
color = defaultBlueButtonColor;
}

// $FlowFixMe
if (tagline === "false") {
// $FlowFixMe
Expand Down

0 comments on commit 4a3a827

Please sign in to comment.