Created
October 6, 2015 13:51
-
-
Save madetech-com/64baf91bb8ef49c8babe to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Comment { | |
styles = { | |
username: { | |
fontWeight: 'bold', | |
paddingRight: '10px', | |
}, | |
comment: { | |
color: '#444', | |
}, | |
}; | |
render () { | |
return ( | |
<li style={this.styles} onClick={this.handleClick.bind(this)}> | |
<span class="username">{this.props.username}</span> | |
<span class="comment">{this.props.comment}</span> | |
</li> | |
); | |
}; | |
handleClick () { | |
alert('clicked!'); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment