plane/apps/app/components/icons/state-group-icon.tsx

30 lines
885 B
TypeScript
Raw Normal View History

2023-03-01 06:00:49 +00:00
import {
BacklogStateIcon,
CancelledStateIcon,
CompletedStateIcon,
StartedStateIcon,
UnstartedStateIcon,
} from "components/icons";
2023-02-28 09:12:46 +00:00
export const getStateGroupIcon = (
stateGroup: "backlog" | "unstarted" | "started" | "completed" | "cancelled",
width = "20",
height = "20",
color?: string
) => {
switch (stateGroup) {
case "backlog":
return <BacklogStateIcon width={width} height={height} color={color} />;
case "unstarted":
2023-03-01 06:00:49 +00:00
return <UnstartedStateIcon width={width} height={height} color={color} />;
2023-02-28 09:12:46 +00:00
case "started":
return <StartedStateIcon width={width} height={height} color={color} />;
case "completed":
return <CompletedStateIcon width={width} height={height} color={color} />;
case "cancelled":
2023-03-01 06:00:49 +00:00
return <CancelledStateIcon width={width} height={height} color={color} />;
2023-02-28 09:12:46 +00:00
default:
return <></>;
}
};