import React from "react"; import { progressWithByParams, getProgressPoint, } from "../../../helpers/bar-helper"; import { BarDisplay } from "./bar-display"; import { BarProgressHandle } from "./bar-progress-handle"; import { TaskItemProps } from "../task-item"; import styles from "./bar.module.css"; export const BarSmall: React.FC = ({ task, isProgressChangeable, isDateChangeable, onEventStart, isSelected, }) => { const progressWidth = progressWithByParams(task.x1, task.x2, task.progress); const progressPoint = getProgressPoint( progressWidth + task.x1, task.y, task.height ); return ( { isDateChangeable && onEventStart("move", task, e); }} /> {isProgressChangeable && ( { onEventStart("progress", task, e); }} /> )} ); };