Commit fced16b0 authored by Paul Kaplan's avatar Paul Kaplan

Make Comment component a prop

parent 03ce4470
...@@ -131,7 +131,7 @@ class TopLevelComment extends React.Component { ...@@ -131,7 +131,7 @@ class TopLevelComment extends React.Component {
return ( return (
<FlexRow className="comment-container"> <FlexRow className="comment-container">
<Comment <this.props.commentComponent
highlighted={highlightedCommentId === id} highlighted={highlightedCommentId === id}
postURI={postURI} postURI={postURI}
onAddComment={this.handleAddComment} onAddComment={this.handleAddComment}
...@@ -173,7 +173,7 @@ class TopLevelComment extends React.Component { ...@@ -173,7 +173,7 @@ class TopLevelComment extends React.Component {
<React.Fragment <React.Fragment
key={`reply-and-status-${reply.id}`} key={`reply-and-status-${reply.id}`}
> >
<Comment <this.props.commentComponent
author={reply.author} author={reply.author}
canDelete={canDelete} canDelete={canDelete}
canDeleteWithoutConfirm={canDeleteWithoutConfirm} canDeleteWithoutConfirm={canDeleteWithoutConfirm}
...@@ -233,6 +233,7 @@ TopLevelComment.propTypes = { ...@@ -233,6 +233,7 @@ TopLevelComment.propTypes = {
canReply: PropTypes.bool, canReply: PropTypes.bool,
canReport: PropTypes.bool, canReport: PropTypes.bool,
canRestore: PropTypes.bool, canRestore: PropTypes.bool,
commentComponent: PropTypes.element,
content: PropTypes.string, content: PropTypes.string,
datetimeCreated: PropTypes.string, datetimeCreated: PropTypes.string,
defaultExpanded: PropTypes.bool, defaultExpanded: PropTypes.bool,
...@@ -260,7 +261,8 @@ TopLevelComment.defaultProps = { ...@@ -260,7 +261,8 @@ TopLevelComment.defaultProps = {
defaultExpanded: false, defaultExpanded: false,
hasThreadLimit: false, hasThreadLimit: false,
moreRepliesToLoad: false, moreRepliesToLoad: false,
threadHasReplyStatus: false threadHasReplyStatus: false,
commentComponent: Comment
}; };
module.exports = TopLevelComment; module.exports = TopLevelComment;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment