Skip to content

Commit

Permalink
feat: added text overrides on PaymentsCheckoutAction
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 57a1cf9
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ class PaymentsCheckoutAction extends Component {
* Alert object provides alert into to InlineAlert.
*/
alert: CustomPropTypes.alert,
/**
* The text for the "Billing Address" title text.
*/
billingAddressTitleText: PropTypes.string,
/**
* You can provide a `className` prop that will be applied to the outermost DOM element
* rendered by this component. We do not recommend using this for styling purposes, but
Expand Down Expand Up @@ -120,7 +124,8 @@ class PaymentsCheckoutAction extends Component {
static defaultProps = {
onReadyForSaveChange() {},
onReset() {},
onSubmit() {}
onSubmit() {},
billingAddressTitleText: "Billing Address"
};

constructor(props) {
Expand Down Expand Up @@ -212,11 +217,11 @@ class PaymentsCheckoutAction extends Component {
};

renderBillingAddressForm() {
const { addresses, components: { AddressChoice }, isSaving } = this.props;
const { addresses, components: { AddressChoice }, isSaving, billingAddressTitleText } = this.props;

return (
<Fragment>
<Title>Billing Address</Title>
<Title>{billingAddressTitleText}</Title>
<AddressChoice addresses={addresses} isReadOnly={isSaving} onChange={this.handleAddressChange} />
</Fragment>
);
Expand Down

0 comments on commit 57a1cf9

Please sign in to comment.