fix: state group icon (#2072)
This commit is contained in:
parent
4559a1bd5d
commit
9d9c1a86bf
13 changed files with 43 additions and 20 deletions
29
space/components/icons/state-group/state-group-icon.tsx
Normal file
29
space/components/icons/state-group/state-group-icon.tsx
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
// icons
|
||||
import {
|
||||
BacklogStateIcon,
|
||||
CancelledStateIcon,
|
||||
CompletedStateIcon,
|
||||
StartedStateIcon,
|
||||
UnstartedStateIcon,
|
||||
} from "components/icons";
|
||||
import { TIssueGroupKey } from "types/issue";
|
||||
|
||||
type Props = {
|
||||
stateGroup: TIssueGroupKey;
|
||||
color: string;
|
||||
className?: string;
|
||||
height?: string;
|
||||
width?: string;
|
||||
};
|
||||
|
||||
export const StateGroupIcon: React.FC<Props> = ({ stateGroup, className, color, height = "12px", width = "12px" }) => {
|
||||
if (stateGroup === "backlog")
|
||||
return <BacklogStateIcon className={className} color={color} height={height} width={width} />;
|
||||
else if (stateGroup === "cancelled")
|
||||
return <CancelledStateIcon className={className} color={color} height={height} width={width} />;
|
||||
else if (stateGroup === "completed")
|
||||
return <CompletedStateIcon className={className} color={color} height={height} width={width} />;
|
||||
else if (stateGroup === "started")
|
||||
return <StartedStateIcon className={className} color={color} height={height} width={width} />;
|
||||
else return <UnstartedStateIcon className={className} color={color} height={height} width={width} />;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue