import { Expand, Shrink } from "lucide-react"; // hooks // helpers import { cn } from "helpers/common.helper"; // types import { IGanttBlock, TGanttViews } from "../types"; // constants import { VIEWS_LIST } from "components/gantt-chart/data"; import { useGanttChart } from "../hooks/use-gantt-chart"; import { observer } from "mobx-react"; type Props = { blocks: IGanttBlock[] | null; fullScreenMode: boolean; handleChartView: (view: TGanttViews) => void; handleToday: () => void; loaderTitle: string; title: string; toggleFullScreenMode: () => void; }; export const GanttChartHeader: React.FC = observer((props) => { const { blocks, fullScreenMode, handleChartView, handleToday, loaderTitle, title, toggleFullScreenMode } = props; // chart hook const { currentView } = useGanttChart(); return (
{title}
{blocks ? `${blocks.length} ${loaderTitle}` : "Loading..."}
{VIEWS_LIST.map((chartView: any) => (
handleChartView(chartView?.key)} > {chartView?.title}
))}
); });