Files
astuto/app/javascript/components/Roadmap/PostListItem.tsx

21 lines
545 B
TypeScript
Raw Normal View History

2019-08-26 14:29:56 +02:00
import * as React from 'react';
import { TitleText, UppercaseText } from '../common/CustomTexts';
2019-08-26 14:29:56 +02:00
interface Props {
2019-09-12 15:51:45 +02:00
id: number;
2019-08-26 14:29:56 +02:00
title: string;
boardName: string;
openPostInNewTab: boolean;
2019-08-26 14:29:56 +02:00
}
const PostListItem = ({id, title, boardName, openPostInNewTab}: Props) => (
<a href={`/posts/${id}`} className="postLink" target={openPostInNewTab ? '_blank' : '_self'}>
<div className="postListItem">
<TitleText>{title}</TitleText>
<UppercaseText>{boardName}</UppercaseText>
2019-08-26 14:29:56 +02:00
</div>
</a>
);
export default PostListItem;