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