mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 11:47:56 +01:00
Refactor CSS files and structure. Also refactors some html and React components for a smarter use of CSS classes.
41 lines
876 B
TypeScript
41 lines
876 B
TypeScript
import * as React from 'react';
|
|
|
|
import PostStatusLabel from '../common/PostStatusLabel';
|
|
import Button from '../common/Button';
|
|
|
|
interface Props {
|
|
name: string;
|
|
color: string;
|
|
|
|
handleClick(): void;
|
|
isCurrentFilter: boolean;
|
|
handleResetFilter(): void;
|
|
}
|
|
|
|
const PostStatusListItem = ({
|
|
name,
|
|
color,
|
|
handleClick,
|
|
isCurrentFilter,
|
|
handleResetFilter,
|
|
}: Props) => (
|
|
<div className={
|
|
"postStatusListItemContainer " + `postStatus${name.replace(/ /g, '')}`
|
|
}>
|
|
<a onClick={handleClick} className="postStatusListItemLink">
|
|
<div className="postStatusListItem">
|
|
<PostStatusLabel name={name} color={color} />
|
|
</div>
|
|
</a>
|
|
{
|
|
isCurrentFilter ?
|
|
<Button onClick={handleResetFilter} className="resetFilter" outline>
|
|
X
|
|
</Button>
|
|
:
|
|
null
|
|
}
|
|
</div>
|
|
);
|
|
|
|
export default PostStatusListItem; |