Skip to content

Commit a20a516

Browse files
author
Hai-Yen Nguyen
committed
changing the logic for color check
1 parent a77ecd7 commit a20a516

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

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

+5-4
Original file line numberDiff line numberDiff line change
@@ -678,11 +678,12 @@ export function normalizeButtonStyle(
678678
borderRadius,
679679
} = style;
680680

681-
const isColorUnset = color === "" || color === undefined;
682-
683681
// This sets the button color so it gets passed to the query string parameter style.color to scnw
684-
if (isPaypalRebrandEnabled && isColorUnset) {
685-
color = defaultBlueButtonColor;
682+
if (isPaypalRebrandEnabled) {
683+
const shouldRenderButtonColorControl = defaultBlueButtonColor === "gold";
684+
const experimentButtonColor = defaultBlueButtonColor || "gold";
685+
686+
color = shouldRenderButtonColorControl ? color : experimentButtonColor;
686687
}
687688

688689
// $FlowFixMe

0 commit comments

Comments
 (0)