diff options
author | Vitaly Takmazov | 2017-12-20 13:28:12 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2023-01-13 10:37:52 +0300 |
commit | 813c5e7eda90944733d60dd324459ced93c9c087 (patch) | |
tree | b3a7e40532aef4544377e66fd00a0fc5eac21671 /vnext/src/components | |
parent | a12975463c3389e506d24288341b30257419d8d2 (diff) |
initial demo
Diffstat (limited to 'vnext/src/components')
-rw-r--r-- | vnext/src/components/message.jsx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/vnext/src/components/message.jsx b/vnext/src/components/message.jsx new file mode 100644 index 00000000..faeb4b4e --- /dev/null +++ b/vnext/src/components/message.jsx @@ -0,0 +1,26 @@ +import React, {PropTypes} from "react" + +const Message = React.createClass({ + propTypes: { + mid: PropTypes.number.isRequired, + user: PropTypes.shape({ + uid: PropTypes.number.isRequired, + uname: PropTypes.string.isRequired + }), + timestamp: PropTypes.string.isRequired, + body: PropTypes.string.isRequired + }, + render() { return ( + <article> + <aside> + <a href={this.props.user.uname + "/"}> + <img src={"//i.juick.com/a/" + this.props.user.uid + ".png"} alt=""/></a> + </aside> + <header className="u">@<a href={this.props.user.uname + "/"}>{this.props.user.uname}</a>: </header> + <header className="t"><a href={this.props.user.uname + "/" + this.props.mid}> + <time dateTime={this.props.timestamp} title={this.props.timestamp}>{this.props.timestamp}</time></a></header> + <p>{this.props.body}</p> + </article>) } +}); + +export default Message
\ No newline at end of file |