SetStatus.js

 1import { withStyles } from '@material-ui/core/styles';
 2import gql from 'graphql-tag';
 3import React from 'react';
 4import Author from '../Author';
 5import Date from '../Date';
 6
 7const styles = theme => ({
 8  main: {
 9    ...theme.typography.body2,
10    marginLeft: theme.spacing.unit + 40,
11  },
12});
13
14const SetStatus = ({ op, classes }) => {
15  return (
16    <div className={classes.main}>
17      <Author author={op.author} bold />
18      <span> {op.status.toLowerCase()} this</span>
19      <Date date={op.date} />
20    </div>
21  );
22};
23
24SetStatus.fragment = gql`
25  fragment SetStatus on TimelineItem {
26    ... on SetStatusTimelineItem {
27      date
28      author {
29        name
30        email
31        displayName
32      }
33      status
34    }
35  }
36`;
37
38export default withStyles(styles)(SetStatus);