import React from "react"; import { progressWithByParams } from "../../../helpers/bar-helper"; import { TaskItemProps } from "../task-item"; import styles from "./project.module.css"; export const Project: React.FC = ({ task, isSelected }) => { const barColor = isSelected ? task.styles.backgroundSelectedColor : task.styles.backgroundColor; const processColor = isSelected ? task.styles.progressSelectedColor : task.styles.progressColor; const progressWidth = progressWithByParams(task.x1, task.x2, task.progress); const projectWith = task.x2 - task.x1; const projectLeftTriangle = [ task.x1, task.y + task.height / 2 - 1, task.x1, task.y + task.height, task.x1 + 15, task.y + task.height / 2 - 1, ].join(","); const projectRightTriangle = [ task.x2, task.y + task.height / 2 - 1, task.x2, task.y + task.height, task.x2 - 15, task.y + task.height / 2 - 1, ].join(","); return ( ); };