import { withStyles } from '@material-ui/core/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 Typography from '@material-ui/core/Typography'; 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'; const Open = ({ className }) => ( ); const Closed = ({ className }) => ( ); const Status = ({ status, className }) => { switch (status) { case 'OPEN': return ; case 'CLOSED': return ; default: return 'unknown status ' + status; } }; const styles = theme => ({ cell: { display: 'flex', alignItems: 'center', '& a': { textDecoration: 'none', }, }, status: { margin: 10, }, expand: { width: '100%', }, title: { display: 'inline', }, labels: { paddingLeft: theme.spacing.unit, }, }); const BugRow = ({ bug, classes }) => ( {bug.title} {bug.labels.length > 0 && ( {bug.labels.map(l => ( ))} )} {bug.humanId} opened by {bug.author.name} ); BugRow.fragment = gql` fragment BugRow on Bug { id humanId title status createdAt labels author { name } } `; export default withStyles(styles)(BugRow);