Skip to content

Commit

Permalink
feat: added text overrides on CheckoutEmailAddress
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 920d710
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,22 @@ class CheckoutEmailAddress extends Component {
*/
className: PropTypes.string,
emailAddress: PropTypes.string.isRequired,
isAccountEmail: PropTypes.bool.isRequired
isAccountEmail: PropTypes.bool.isRequired,
/**
* The text for the "Signed in as" label text.
*/
signedInText: PropTypes.string,
};

static defaultProps = {
signedInText: "Signed in as"
}

renderAccountEmail = () => {
const { isAccountEmail } = this.props;
const { isAccountEmail, signedInText } = this.props;

if (isAccountEmail) {
return "Signed in as";
return signedInText;
}

return null;
Expand Down

0 comments on commit 920d710

Please sign in to comment.