Basic comments visualisation

This commit is contained in:
riggraz
2019-09-17 17:04:19 +02:00
parent 476f720119
commit 0c0c6d4e30
9 changed files with 114 additions and 12 deletions

View File

@@ -0,0 +1,36 @@
import * as React from 'react';
import { MutedText } from '../shared/CustomTexts';
interface Props {
id: number;
body: string;
parentId: number;
userFullName: string;
updatedAt: string;
level: number;
}
const Comment = ({
id,
body,
parentId,
userFullName,
updatedAt,
level,
}: Props) => (
<div className="comment">
<div className="commentHeader">
<span className="commentAuthor">{userFullName}</span>
</div>
<p className="commentBody">{body}</p>
<div className="commentFooter">
<a href="#">Reply</a>
<MutedText>{updatedAt}</MutedText>
</div>
</div>
);
export default Comment;