Skip to content

Commit 9012e76

Browse files
committed
fix type errors
1 parent 69d16f9 commit 9012e76

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/types.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import { CARD, WALLET_INSTRUMENT } from "@paypal/sdk-constants/src";
44

5+
import { BUTTON_COLOR } from "./constants";
6+
57
export type SecondaryInstruments = $ReadOnlyArray<{|
68
type: string,
79
label: string,
@@ -63,7 +65,7 @@ export type Experiment = {|
6365
// first render experiments
6466
venmoVaultWithoutPurchase?: boolean,
6567
isPaypalRebrandEnabled?: boolean,
66-
defaultBlueButtonColor?: string,
68+
defaultBlueButtonColor?: $Values<typeof BUTTON_COLOR>,
6769
venmoEnableWebOnNonNativeBrowser?: boolean,
6870
|};
6971

src/ui/buttons/button.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export function Button({
128128
}
129129

130130
if (isPaypalRebrandEnabled) {
131-
color = defaultBlueButtonColor;
131+
color = defaultBlueButtonColor || "gold";
132132
}
133133
// The secondary colors are used to render the smart stack (multiple buttons)
134134
// they keep track of the mapping of the color style prop to the

src/ui/buttons/styles/responsive.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export function buttonResponsiveStyle({
7070
let labelHeight = max(roundUp(perc(buttonHeight, 35) + 5, 2), 12);
7171

7272
if (shouldApplyRebrandedStyles) {
73-
labelHeight = roundUp(perc(buttonHeight, 76));
73+
labelHeight = roundUp(perc(buttonHeight, 76), 1);
7474
// smallerLabelHeight gets triggered at widths < 320px
7575
// We will need to investigate why the labels need to get significantly smaller at this breakpoint
7676
smallerLabelHeight = labelHeight;

0 commit comments

Comments
 (0)