import React, { FC, useState, ReactNode } from "react"; import SwipeableViews from "react-swipeable-views"; import { makeStyles, Theme, useTheme } from "@material-ui/core/styles"; import AppBar from "@material-ui/core/AppBar"; import Tabs from "@material-ui/core/Tabs"; import Tab from "@material-ui/core/Tab"; import Typography from "@material-ui/core/Typography"; import Box from "@material-ui/core/Box"; import { Ticket } from "../types/Ticket"; import { Project } from "../types/Project"; import { FileList } from "./AppFileList"; import { TicketList } from "./TicketList"; import { AppFile } from "../types/AppFile"; interface TabProps { children?: ReactNode; dir?: string; index: any; value: any; } const TabPanel: FC = (props: TabProps) => { const { children, value, index, ...other } = props; return ( ); }; const a11yProps = (index: any) => { return { id: `full-width-tab-${index}`, "aria-controls": `full-width-tabpanel-${index}`, }; }; const useStyles = makeStyles((theme: Theme) => ({ root: { backgroundColor: "#E9ECEF", borderRadius: "20px", }, })); interface IProps { tickets: Ticket[]; remainingDays?: number; tabNames: string[]; files: AppFile[]; // activities: Activity[]; allProjects: Project[]; } export const ProjectTabPanel: FC = ({ tickets, tabNames, files, // allProjects }) => { const classes = useStyles(); const theme = useTheme(); const [value, setValue] = useState(0); const handleChange = (event: React.ChangeEvent<{}>, newValue: number) => { setValue(newValue); }; const handleChangeIndex = (index: number) => { setValue(index); }; return (
{tabNames.map((t: string, i: number) => ( ))}
); };