mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 11:47:56 +01:00
Improve post list filter by status (#267)
This commit is contained in:
committed by
GitHub
parent
30b7b0f5f4
commit
a7d67652bf
@@ -2,6 +2,7 @@ import * as React from 'react';
|
||||
|
||||
import PostStatusLabel from '../common/PostStatusLabel';
|
||||
import Button from '../common/Button';
|
||||
import { CancelIcon } from '../common/Icons';
|
||||
|
||||
interface Props {
|
||||
name: string;
|
||||
@@ -9,7 +10,6 @@ interface Props {
|
||||
|
||||
handleClick(): void;
|
||||
isCurrentFilter: boolean;
|
||||
handleResetFilter(): void;
|
||||
}
|
||||
|
||||
const PostStatusListItem = ({
|
||||
@@ -17,19 +17,18 @@ const PostStatusListItem = ({
|
||||
color,
|
||||
handleClick,
|
||||
isCurrentFilter,
|
||||
handleResetFilter,
|
||||
}: Props) => (
|
||||
<div className={
|
||||
"postStatusListItemContainer " + `postStatus${name.replace(/ /g, '')}`
|
||||
}>
|
||||
<a onClick={handleClick} className="postStatusListItemLink">
|
||||
<div className="postStatusListItem">
|
||||
<div className={`postStatusListItem${isCurrentFilter ? ' postStatusListItemSelected' : ''}`}>
|
||||
<PostStatusLabel name={name} color={color} />
|
||||
</div>
|
||||
</a>
|
||||
{
|
||||
isCurrentFilter ?
|
||||
<Button onClick={handleResetFilter} className="resetFilter" outline>
|
||||
<Button onClick={handleClick} className="resetFilter" outline>
|
||||
X
|
||||
</Button>
|
||||
:
|
||||
|
||||
Reference in New Issue
Block a user