Skip to content

Commit

Permalink
fix(payment): PAYPAL-4594 added missing styles
Browse files Browse the repository at this point in the history
  • Loading branch information
andriiVitvitskyi1990 committed Sep 2, 2024
1 parent 21190f8 commit 0226e3c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/braintree-utils/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,17 @@ export interface BraintreeFastlaneStylesOption {
backgroundColorPrimary?: string;
errorColor?: string;
fontFamily?: string;
fontSizeBase?: string;
padding?: string;
textColorBase?: string;
};
input?: {
borderRadius?: string;
borderColor?: string;
focusBorderColor?: string;
backgroundColor?: string;
borderWidth?: string;
textColorBase?: string;
};
toggle?: {
colorPrimary?: string;
Expand Down Expand Up @@ -393,6 +399,12 @@ export interface FastlaneStylesSettings {
fastlaneTextCaptionSettingsFontSize?: string;
fastlaneTextCaptionSettingsColor?: string;
fastlaneBrandingSettings?: string;
fastlaneRootSettingsFontSize?: string;
fastlaneRootSettingsPadding?: string;
fastlaneInputSettingsBackgroundColor?: string;
fastlaneInputSettingsBorderWidth?: string;
fastlaneRootSettingsTextColorBase?: string;
fastlaneInputSettingsTextColorBase?: string;
}

export interface BraintreeFastlaneTokenizeOptions {
Expand Down
14 changes: 14 additions & 0 deletions packages/braintree-utils/src/utils/get-fastlane-styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ function mergeFastlaneStyles(
uiStyles?.root?.backgroundColorPrimary,
errorColor: styleSettings?.fastlaneRootSettingsErrorColor || uiStyles?.root?.errorColor,
fontFamily: styleSettings?.fastlaneRootSettingsFontFamily || uiStyles?.root?.fontFamily,
fontSizeBase:
styleSettings?.fastlaneRootSettingsFontSize || uiStyles?.root?.fontSizeBase,
padding: styleSettings?.fastlaneRootSettingsPadding || uiStyles?.root?.padding,
textColorBase:
styleSettings?.fastlaneRootSettingsTextColorBase || uiStyles?.root?.textColorBase,
},
input: {
borderRadius:
Expand All @@ -37,6 +42,15 @@ function mergeFastlaneStyles(
focusBorderColor:
styleSettings?.fastlaneInputSettingsFocusBorderColor ||
uiStyles?.input?.focusBorderColor,
backgroundColor:
styleSettings?.fastlaneInputSettingsBackgroundColor ||
uiStyles?.input?.backgroundColor,
borderWidth:
styleSettings?.fastlaneInputSettingsBorderWidth ||
uiStyles?.input?.borderWidth,
textColorBase:
styleSettings?.fastlaneInputSettingsTextColorBase ||
uiStyles?.input?.textColorBase,
},
toggle: {
colorPrimary:
Expand Down

0 comments on commit 0226e3c

Please sign in to comment.