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

feat: added text overrides on StripePaymentCheckoutAction #461

Conversation

HarisSpahijaPon
Copy link
Contributor

Signed-off-by: Haris Spahija [email protected]

Part of: #409
Impact: minor
Type: feature

Component

StripePaymentCheckoutAction now has overrides when i18next will be implemented (see #409)

Breaking changes

No breaking chances, all added fields are optional

Testing

  1. Add a new prop billingAddressTitleText to <StripePaymentCheckoutAction />
  2. Add the value "test" to billingAddressTitleText
  3. Button should display "test" when test is given as a value to the prop. When the prop billingAddressTitleText is not added, it should default to the values given in default props

Added props:

billingAddressTitleText: PropTypes.string,
secureCaptionText: PropTypes.string,

@HarisSpahijaPon
Copy link
Contributor Author

@aldeed these items should be translated aswell but are they part of the component? Should I add overrides in the same way?

const billingAddressOptions = [{
  id: "1",
  label: "Same as shipping address",
  value: "same_as_shipping"
},
{
  id: "2",
  label: "Use a different billing address",
  value: "use_different_billing_address"
}];

@aldeed
Copy link
Contributor

aldeed commented Nov 26, 2019

@HarisSpahijaPon Yes, I would move it down into the component and add sameAddressLabelText and differentAddressLabelText props or something similar.

Signed-off-by: Haris Spahija <[email protected]>
@rc-publisher
Copy link
Collaborator

🚀 Preview deployed

Built with commit 1aef6f5

https://deploy-preview-461--stoic-hodgkin-c0179e.netlify.com

Copy link
Contributor

@aldeed aldeed left a comment

Choose a reason for hiding this comment

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

Need to deal with billingAddressOptions as discussed above

@HarisSpahijaPon
Copy link
Contributor Author

I currently have very little time to do this one, I opened it to the community in the story. Maybe someone can fix this for a new release.

@aldeed
Copy link
Contributor

aldeed commented Dec 9, 2019

It works as is and billingAddressOptions can be done in a future PR

@spencern spencern merged commit 6dddeb8 into reactioncommerce:master Dec 9, 2019
@rc-publisher
Copy link
Collaborator

🎉 This PR is included in version 0.69.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@rc-publisher rc-publisher added the released Applied automatically by semantic-release label Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Applied automatically by semantic-release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants