Created
January 21, 2017 17:04
-
-
Save dochoaj/e2c4c972b61d8be8db8fa0876f9d5e86 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
| 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