Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button customization and state param #2

Merged
merged 5 commits into from
Mar 31, 2020

Conversation

ravikanthreddy89
Copy link
Collaborator

@ravikanthreddy89 ravikanthreddy89 commented Mar 27, 2020

Change list

  • New colors for button 'gold' and 'darkblue' (darkblue supported only for Credit funding source)
  • new "state" param button prop
  • latest flow-eslint plugin started complaining about object exactness after fresh install. New version of 'eslint-flowtype-plugin' came with a fixer for object exactness rule. Fixed some of the lint rule violations with fixer and for other violation disabled it (in config.js for screenshot tests)

@@ -4,8 +4,15 @@ export const BUTTON_LABEL = {
CONNECT: ('connect' : 'connect')
};

export const BUTTON_FUNDING_TYPE = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use FUNDING from @paypal/sdk-constants/src

BLUE: ('blue' : 'blue')
GOLD: ('gold' : 'gold'),
BLUE: ('blue' : 'blue'),
DARKBLUE: ('darkblue' : 'darkblue')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make sure that:

  • Gold and blue are only usable by paypal button
  • Dark blue is only usable by credit button

To make sure we're aligning with brand

...DEFAULT_OAUTH_PROPS
...DEFAULT_OAUTH_PROPS,
style: {
...(fundingSource === FUNDING.CREDIT ? { color: BUTTON_COLOR.DARKBLUE } : {})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should default to darkblue if the funding source is credit, without the merchant needing to pass it explicitly.

@ravikanthreddy89 ravikanthreddy89 changed the title [WIP]Button customization and state param Button customization and state param Mar 30, 2020
@bluepnume bluepnume merged commit a7b3ca3 into paypal:master Mar 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants