mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 03:37:56 +01:00
Add post list
This commit is contained in:
32
app/javascript/components/Board/PostListItem.tsx
Normal file
32
app/javascript/components/Board/PostListItem.tsx
Normal file
@@ -0,0 +1,32 @@
|
||||
import * as React from 'react';
|
||||
|
||||
interface Props {
|
||||
title: string;
|
||||
description?: string;
|
||||
postStatus: {name: string, color: string};
|
||||
}
|
||||
|
||||
const PostListItem = ({ title, description, postStatus}: Props) => (
|
||||
<a href="#" className="postLink">
|
||||
<div className="postListItem">
|
||||
<div className="postTitle">{title}</div>
|
||||
<div className="postDescription">
|
||||
{
|
||||
description && description.length > 120 ?
|
||||
description.slice(0, 119) + '...'
|
||||
:
|
||||
description || '<No description provided.>'
|
||||
}
|
||||
</div>
|
||||
<div className="postDetails">
|
||||
<div className="postDetailsComments">💬 0 comments</div>
|
||||
<div className="postDetailsStatus" style={{color: postStatus.color}}>
|
||||
<div className="dot" style={{backgroundColor: postStatus.color}}></div>
|
||||
<span className="postStatusName">{postStatus.name}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
);
|
||||
|
||||
export default PostListItem;
|
||||
Reference in New Issue
Block a user