Skip to content

Instantly share code, notes, and snippets.

@dochoaj
Created January 21, 2017 17:04
Show Gist options
  • Save dochoaj/e2c4c972b61d8be8db8fa0876f9d5e86 to your computer and use it in GitHub Desktop.
Save dochoaj/e2c4c972b61d8be8db8fa0876f9d5e86 to your computer and use it in GitHub Desktop.
import React, { Component } from 'react'
import './Tweet.scss'
class Tweet extends Component {
render() {
return (
<div className="tweet-container">
<div className="tweet" data-id={this.props.id}>
<div className="tweet-image">
<img src={this.props.avatar} alt="Tweet pic" />
</div>
<div className="tweet-content">
<div className="tweet-line">
<strong>{this.props.username}</strong>
<small>13m</small>
</div>
<div className="tweet-line">
{this.props.content}
</div>
</div>
</div>
</div>
)
}
}
Tweet.propTypes = {
content: React.PropTypes.string,
id: React.PropTypes.number,
avatar: React.PropTypes.string,
username: React.PropTypes.string,
}
export default Tweet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment