gantt-task-react/src/components/Calendar/top-part-of-calendar.tsx

42 lines
699 B
TypeScript
Raw Normal View History

2020-07-22 20:50:43 +03:00
import React from 'react';
import '../../style.css';
type TopPartOfCalendarProps = {
value: string;
x1Line: number;
y1Line: number;
y2Line: number;
xText: number;
yText: number;
};
export const TopPartOfCalendar: React.FC<TopPartOfCalendarProps> = ({
value,
x1Line,
y1Line,
y2Line,
xText,
yText,
}) => {
return (
<>
<line
x1={x1Line}
y1={y1Line}
x2={x1Line}
y2={y2Line}
className="GanttCalendar-topTick"
key={value + 'line'}
></line>
<text
key={value + 'text'}
y={yText}
x={xText}
className="GanttCalendar-topText"
>
{value}
</text>
</>
);
};