Skip to content

Instantly share code, notes, and snippets.

@madetech-com
Created October 6, 2015 13:51
Show Gist options
  • Save madetech-com/64baf91bb8ef49c8babe to your computer and use it in GitHub Desktop.
Save madetech-com/64baf91bb8ef49c8babe to your computer and use it in GitHub Desktop.
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