Advertisement
Guest User

Untitled

a guest
Jul 24th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. class EmailButton extends Component {
  2. constructor(props){
  3. super(props);
  4. this.onClick = this.onClick.bind(this);
  5. }
  6. onClick(){
  7. window.location.href = `mailto:${this.props.email}`;
  8. }
  9. render(){
  10. return (<button onClick={this.onClick}>EmailButton</button>);
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement