feat(projects): edit entrance.

This commit is contained in:
Ivan Li 2021-05-05 13:26:39 +08:00
parent 93482bec3f
commit b1e84709db

View File

@ -1,8 +1,10 @@
import { Project } from "../generated/graphql"; import { Project } from "../generated/graphql";
import React, { FC, Fragment } from "react"; import React, { FC, Fragment } from "react";
import { Grid, makeStyles, Paper, Portal, Typography } from "@material-ui/core"; import { IconButton, Grid, makeStyles, Paper, Portal, Typography } from "@material-ui/core";
import { useHeaderContainer } from "../layouts"; import { useHeaderContainer } from "../layouts";
import { PipelineList } from "../pipelines/pipeline-list"; import { PipelineList } from "../pipelines/pipeline-list";
import { Edit } from '@material-ui/icons';
import { Link } from '@curi/react-dom';
interface Props { interface Props {
project: Project; project: Project;
@ -44,11 +46,21 @@ export const ProjectDetail: FC<Props> = ({ project }) => {
{project.comment} {project.comment}
</Typography> </Typography>
</Grid> </Grid>
<Grid item>Options</Grid> <Grid item>
<Link name="edit-project" params={{ projectId: project.id }}>
<IconButton style={{ color: "white" }}>{<Edit />}</IconButton>
</Link>
</Grid>
</Grid> </Grid>
</Portal> </Portal>
<Grid container spacing={1} direction="row" alignItems="stretch" className={classes.root}> <Grid
<Grid item xs={3} style={{height: '100%', display: 'flex'}}> container
spacing={1}
direction="row"
alignItems="stretch"
className={classes.root}
>
<Grid item xs={3} style={{ height: "100%", display: "flex" }}>
<Paper className={classes.pipelineListContainer}> <Paper className={classes.pipelineListContainer}>
<PipelineList projectId={project.id} /> <PipelineList projectId={project.id} />
</Paper> </Paper>