mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
38 lines
853 B
TypeScript
38 lines
853 B
TypeScript
import { FC } from "react";
|
|
// components
|
|
import { ChartViewRoot } from "./chart";
|
|
// context
|
|
import { ChartContextProvider } from "./contexts";
|
|
|
|
type GanttChartRootProps = {
|
|
border?: boolean;
|
|
title: null | string;
|
|
loaderTitle: string;
|
|
blocks: any;
|
|
blockUpdateHandler: (data: any) => void;
|
|
sidebarBlockRender: FC<any>;
|
|
blockRender: FC<any>;
|
|
};
|
|
|
|
export const GanttChartRoot: FC<GanttChartRootProps> = ({
|
|
border = true,
|
|
title = null,
|
|
blocks,
|
|
loaderTitle = "blocks",
|
|
blockUpdateHandler,
|
|
sidebarBlockRender,
|
|
blockRender,
|
|
}) => (
|
|
<ChartContextProvider>
|
|
<ChartViewRoot
|
|
border={border}
|
|
title={title}
|
|
blocks={blocks}
|
|
loaderTitle={loaderTitle}
|
|
blockUpdateHandler={blockUpdateHandler}
|
|
sidebarBlockRender={sidebarBlockRender}
|
|
blockRender={blockRender}
|
|
/>
|
|
</ChartContextProvider>
|
|
);
|