2023-08-30 06:13:47 +00:00
|
|
|
// icons
|
2024-03-19 14:38:35 +00:00
|
|
|
import { TModuleStatus } from "@plane/types";
|
2023-08-30 06:13:47 +00:00
|
|
|
import {
|
|
|
|
ModuleBacklogIcon,
|
|
|
|
ModuleCancelledIcon,
|
|
|
|
ModuleCompletedIcon,
|
|
|
|
ModuleInProgressIcon,
|
|
|
|
ModulePausedIcon,
|
|
|
|
ModulePlannedIcon,
|
2024-03-19 14:38:35 +00:00
|
|
|
} from "@/components/icons";
|
2023-08-30 06:13:47 +00:00
|
|
|
// types
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
status: TModuleStatus;
|
|
|
|
className?: string;
|
|
|
|
height?: string;
|
|
|
|
width?: string;
|
|
|
|
};
|
|
|
|
|
2023-11-08 15:01:46 +00:00
|
|
|
export const ModuleStatusIcon: React.FC<Props> = ({ status, className, height = "12px", width = "12px" }) => {
|
|
|
|
if (status === "backlog") return <ModuleBacklogIcon className={className} height={height} width={width} />;
|
|
|
|
else if (status === "cancelled") return <ModuleCancelledIcon className={className} height={height} width={width} />;
|
|
|
|
else if (status === "completed") return <ModuleCompletedIcon className={className} height={height} width={width} />;
|
2023-08-30 06:13:47 +00:00
|
|
|
else if (status === "in-progress")
|
|
|
|
return <ModuleInProgressIcon className={className} height={height} width={width} />;
|
2023-11-08 15:01:46 +00:00
|
|
|
else if (status === "paused") return <ModulePausedIcon className={className} height={height} width={width} />;
|
2023-08-30 06:13:47 +00:00
|
|
|
else return <ModulePlannedIcon className={className} height={height} width={width} />;
|
|
|
|
};
|