From 1ad15ed05c047d92cc64e7c5c631a32d3f819ce2 Mon Sep 17 00:00:00 2001 From: Ruidy Nemausat Date: Fri, 17 Apr 2020 10:12:44 +0200 Subject: [PATCH] Updated ProjectTabPanel UI --- client/src/components/ProjectTabPanel.tsx | 24 +++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/client/src/components/ProjectTabPanel.tsx b/client/src/components/ProjectTabPanel.tsx index f763a98..cd61703 100644 --- a/client/src/components/ProjectTabPanel.tsx +++ b/client/src/components/ProjectTabPanel.tsx @@ -1,4 +1,4 @@ -import React, { FC } from "react"; +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"; @@ -13,7 +13,7 @@ import { TicketList } from "./TicketList"; import { AppFile } from "../types/AppFile"; interface TabProps { - children?: React.ReactNode; + children?: ReactNode; dir?: string; index: any; value: any; @@ -39,15 +39,15 @@ const TabPanel: FC = (props: TabProps) => { const a11yProps = (index: any) => { return { id: `full-width-tab-${index}`, - "aria-controls": `full-width-tabpanel-${index}` + "aria-controls": `full-width-tabpanel-${index}`, }; }; const useStyles = makeStyles((theme: Theme) => ({ root: { - backgroundColor: "#ffffff", - flexGrow: 1 - } + backgroundColor: "#E9ECEF", + borderRadius: "20px", + }, })); interface IProps { @@ -62,12 +62,12 @@ interface IProps { export const ProjectTabPanel: FC = ({ tickets, tabNames, - files + files, // allProjects }) => { const classes = useStyles(); const theme = useTheme(); - const [value, setValue] = React.useState(0); + const [value, setValue] = useState(0); const handleChange = (event: React.ChangeEvent<{}>, newValue: number) => { setValue(newValue); @@ -79,14 +79,18 @@ export const ProjectTabPanel: FC = ({ return (
- + {tabNames.map((t: string, i: number) => (