[UI] updated TicketList. AddTicketButton

This commit is contained in:
Ruidy Nemausat 2020-04-17 10:58:25 +02:00
parent 3f0b78f085
commit 4ff69d18b7
2 changed files with 14 additions and 5 deletions

View file

@ -103,7 +103,7 @@ export const ProjectTabPanel: FC<IProps> = ({
onChangeIndex={handleChangeIndex}
>
<TabPanel value={value} index={0} dir={theme.direction}>
<TicketList tickets={tickets} allProjects={[]} addButton={false} />
<TicketList tickets={tickets} allProjects={[]} addButton={true} />
</TabPanel>
<TabPanel value={value} index={1} dir={theme.direction}>
<FileList files={files} />

View file

@ -21,6 +21,10 @@ const useStyles = makeStyles((theme: Theme) =>
header: {
paddingBottom: theme.spacing(2),
},
addButton: {
position: "relative",
marginLeft: "20px",
},
})
);
@ -77,12 +81,17 @@ export const TicketList: FC<TicketListProps> = ({
>
<Typography variant="h4" component="h4">
Tickets
{addButton && (
<span className={classes.addButton}>
<FloatingButton
color="primary"
size="small"
onClick={onClick}
/>
</span>
)}
</Typography>
{addButton && (
<FloatingButton color="primary" size="small" onClick={onClick} />
)}
<FilterBar
filterText={filterText}
handleChange={handleChange}