mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
55 lines
1.7 KiB
TypeScript
55 lines
1.7 KiB
TypeScript
import React from "react";
|
|
import { observer } from "mobx-react-lite";
|
|
import { Tab } from "@headlessui/react";
|
|
// components
|
|
import { CustomAnalytics, ScopeAndDemand } from "components/analytics";
|
|
// types
|
|
import { ICycle, IModule, IProject } from "@plane/types";
|
|
// constants
|
|
import { ANALYTICS_TABS } from "constants/analytics";
|
|
|
|
type Props = {
|
|
fullScreen: boolean;
|
|
cycleDetails: ICycle | undefined;
|
|
moduleDetails: IModule | undefined;
|
|
projectDetails: IProject | undefined;
|
|
};
|
|
|
|
export const ProjectAnalyticsModalMainContent: React.FC<Props> = observer((props) => {
|
|
const { fullScreen, cycleDetails, moduleDetails } = props;
|
|
|
|
return (
|
|
<Tab.Group as={React.Fragment}>
|
|
<Tab.List as="div" className="space-x-2 border-b border-neutral-border-medium p-5 pt-0">
|
|
{ANALYTICS_TABS.map((tab) => (
|
|
<Tab
|
|
key={tab.key}
|
|
className={({ selected }) =>
|
|
`rounded-3xl border border-neutral-border-medium px-4 py-2 text-xs hover:bg-neutral-component-surface-dark ${
|
|
selected ? "bg-neutral-component-surface-dark" : ""
|
|
}`
|
|
}
|
|
onClick={() => {}}
|
|
>
|
|
{tab.title}
|
|
</Tab>
|
|
))}
|
|
</Tab.List>
|
|
<Tab.Panels as={React.Fragment}>
|
|
<Tab.Panel as={React.Fragment}>
|
|
<ScopeAndDemand fullScreen={fullScreen} />
|
|
</Tab.Panel>
|
|
<Tab.Panel as={React.Fragment}>
|
|
<CustomAnalytics
|
|
additionalParams={{
|
|
cycle: cycleDetails?.id,
|
|
module: moduleDetails?.id,
|
|
}}
|
|
fullScreen={fullScreen}
|
|
/>
|
|
</Tab.Panel>
|
|
</Tab.Panels>
|
|
</Tab.Group>
|
|
);
|
|
});
|