import { makeStyles } from '@material-ui/styles'; import TableCell from '@material-ui/core/TableCell/TableCell'; import TableRow from '@material-ui/core/TableRow/TableRow'; import Tooltip from '@material-ui/core/Tooltip/Tooltip'; import ErrorOutline from '@material-ui/icons/ErrorOutline'; import gql from 'graphql-tag'; import React from 'react'; import { Link } from 'react-router-dom'; import Date from '../Date'; import Label from '../Label'; import Author from '../Author'; const Open = ({ className }) => ( ); const Closed = ({ className }) => ( ); const Status = ({ status, className }) => { switch (status) { case 'OPEN': return ; case 'CLOSED': return ; default: return 'unknown status ' + status; } }; const useStyles = makeStyles(theme => ({ cell: { display: 'flex', alignItems: 'center', padding: theme.spacing(1), '& a': { textDecoration: 'none', }, }, status: { margin: theme.spacing(1, 2), }, expand: { width: '100%', lineHeight: '20px', }, title: { display: 'inline', color: theme.palette.text.primary, fontSize: '1.3rem', fontWeight: 500, }, details: { ...theme.typography.textSecondary, lineHeight: '1.5rem', color: theme.palette.text.secondary, }, labels: { paddingLeft: theme.spacing(1), '& > *': { display: 'inline-block', }, }, })); function BugRow({ bug }) { const classes = useStyles(); return (
{bug.title} {bug.labels.length > 0 && ( {bug.labels.map(l => ( )}
{bug.humanId} opened by {bug.author.displayName}
); } BugRow.fragment = gql` fragment BugRow on Bug { id humanId title status createdAt labels { ...Label } ...authored } ${Label.fragment} ${Author.fragment} `; export default BugRow;