Skip to content

Commit

Permalink
feat: added text overrides on StripePaymentCheckoutAction
Browse files Browse the repository at this point in the history
Signed-off-by: Haris Spahija <haris.spahija@pon.com>
  • Loading branch information
HarisSpahijaPon committed Nov 21, 2019
1 parent 4808ec2 commit a3cf757
Showing 1 changed file with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -99,14 +103,20 @@ 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
*/
stepNumber: PropTypes.number.isRequired
};

static defaultProps = {
onReadyForSaveChange() { }
billingAddressTitleText: "Billing Address"
onReadyForSaveChange() { },
secureCaptionText: "Your Information is private and secure.",
};

state = {
Expand Down Expand Up @@ -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;
Expand All @@ -243,9 +255,9 @@ class StripePaymentCheckoutAction extends Component {
stripeRef={(stripe) => { this._stripe = stripe; }}
/>
<SecureCaption>
<IconLockSpan>{iconLock}</IconLockSpan> <Span>Your Information is private and secure.</Span>
<IconLockSpan>{iconLock}</IconLockSpan> <Span>{secureCaptionText}</Span>
</SecureCaption>
<Title>Billing Address</Title>
<Title>{billingAddressTitleText}</Title>
<SelectableList
onChanging={this.handleUseNewBillingAddress}
options={billingAddressOptions}
Expand Down

0 comments on commit a3cf757

Please sign in to comment.