From a3cf7576332d58e37831fa9e6507f4f92e0a3633 Mon Sep 17 00:00:00 2001 From: Haris Spahija Date: Thu, 21 Nov 2019 13:54:49 +0100 Subject: [PATCH] feat: added text overrides on StripePaymentCheckoutAction Signed-off-by: Haris Spahija --- .../v1/StripePaymentCheckoutAction.js | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/package/src/components/StripePaymentCheckoutAction/v1/StripePaymentCheckoutAction.js b/package/src/components/StripePaymentCheckoutAction/v1/StripePaymentCheckoutAction.js index 2e95af4f3..224723b1e 100644 --- a/package/src/components/StripePaymentCheckoutAction/v1/StripePaymentCheckoutAction.js +++ b/package/src/components/StripePaymentCheckoutAction/v1/StripePaymentCheckoutAction.js @@ -48,6 +48,10 @@ class StripePaymentCheckoutAction extends Component { * Alert object provides alert into to InlineAlert. */ alert: CustomPropTypes.alert, + /** + * The text for the "Billing Address" label text. + */ + billingAddressTitleText: PropTypes.string, /** * If you've set up a components context using * [@reactioncommerce/components-context](https://github.com/reactioncommerce/components-context) @@ -99,6 +103,10 @@ class StripePaymentCheckoutAction extends Component { * this function. */ onSubmit: PropTypes.func, + /** + * The text for the "Your Information is private and secure." caption text. + */ + secureCaptionText: PropTypes.string, /** * Checkout process step number */ @@ -106,7 +114,9 @@ class StripePaymentCheckoutAction extends Component { }; static defaultProps = { - onReadyForSaveChange() { } + billingAddressTitleText: "Billing Address" + onReadyForSaveChange() { }, + secureCaptionText: "Your Information is private and secure.", }; state = { @@ -225,9 +235,11 @@ class StripePaymentCheckoutAction extends Component { render() { const { alert, + billingAddressTitleText, components: { iconLock, InlineAlert, SelectableList, StripeForm }, label, - stepNumber + stepNumber, + secureCaptionText } = this.props; const { billingAddress } = this.state; @@ -243,9 +255,9 @@ class StripePaymentCheckoutAction extends Component { stripeRef={(stripe) => { this._stripe = stripe; }} /> - {iconLock} Your Information is private and secure. + {iconLock} {secureCaptionText} - Billing Address + {billingAddressTitleText}