import React from "react"; import gql from "graphql-tag"; import { withStyles } from "@material-ui/core/styles"; import Avatar from "@material-ui/core/Avatar"; import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import CardHeader from "@material-ui/core/CardHeader"; import Typography from "@material-ui/core/Typography"; const styles = theme => ({ comment: { marginBottom: theme.spacing.unit } }); const Comment = withStyles(styles)(({ comment, classes }) => ( {comment.author.name[0].toUpperCase()} } title={comment.author.name} subheader={comment.author.email} /> {comment.message} )); Comment.fragment = gql` fragment Comment on Comment { message author { name email } } `; export default withStyles(styles)(Comment);