Skip to content

Commit

Permalink
feat: added text overrides on StripePaymentInput
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 d082a76
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,17 @@ class StripePaymentInput extends Component {
* method is called. The object may have `data`, `displayName`,
* and `amount` properties.
*/
onSubmit: PropTypes.func
onSubmit: PropTypes.func,
/**
* The text for the "Your Information is private and secure." caption text.
*/
secureCaptionText: PropTypes.string,
};

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

componentDidMount() {
Expand Down Expand Up @@ -95,7 +100,7 @@ class StripePaymentInput extends Component {
}

render() {
const { className, components: { iconLock, StripeForm } } = this.props;
const { className, components: { iconLock, StripeForm }, secureCaptionText } = this.props;

return (
<div className={className}>
Expand All @@ -104,7 +109,7 @@ class StripePaymentInput 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>
</div>
);
Expand Down

0 comments on commit d082a76

Please sign in to comment.