Files
astuto/app/javascript/components/Comments/Comment.tsx
2019-09-17 17:04:19 +02:00

36 lines
647 B
TypeScript

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;