Displaying comment author names.

This commit is contained in:
David Jay
2016-11-07 13:51:10 -05:00
parent cb68298171
commit 3b75445309
3 changed files with 16 additions and 0 deletions
@@ -11,6 +11,7 @@ import Content from '../../coral-plugin-commentcontent/CommentContent'
import PubDate from '../../coral-plugin-pubdate/PubDate'
import Count from '../../coral-plugin-comment-count/CommentCount'
import Flag from '../../coral-plugin-flags/FlagButton'
import AuthorName from '../../coral-plugin-author-name/AuthorName'
import {ReplyBox, ReplyButton} from '../../coral-plugin-replies'
import Pym from 'pym.js'
@@ -117,6 +118,7 @@ class CommentStream extends Component {
const comment = this.props.items[commentId]
return <div className="comment">
<hr aria-hidden={true}/>
<AuthorName name={comment.username}/>
<PubDate created_at={comment.created_at}/>
<Content content={comment.body}/>
<div className="commentActions">
@@ -143,6 +145,7 @@ class CommentStream extends Component {
let reply = this.props.items[replyId]
return <div className="reply">
<hr aria-hidden={true}/>
<AuthorName name={reply.username}/>
<PubDate created_at={reply.created_at}/>
<Content content={reply.body}/>
<div className="replyActions">
@@ -90,6 +90,10 @@ hr {
margin-bottom: 10px;
}
.coral-plugin-author-name-text {
font-weight: bold;
}
/* Reply styles */
@@ -0,0 +1,9 @@
import React from 'react'
const name = 'coral-plugin-author-name'
const AuthorName = ({name}) =>
<div className={name + '-text'}>
{name}
</div>
export default AuthorName