From 2530cee1eac225924e1119554cf475cdc46ed7dc Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Wed, 15 Aug 2018 15:50:19 +0200 Subject: webui: reorganize the code --- webui/src/bug/Comment.js | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 webui/src/bug/Comment.js (limited to 'webui/src/bug/Comment.js') diff --git a/webui/src/bug/Comment.js b/webui/src/bug/Comment.js new file mode 100644 index 00000000..bc108083 --- /dev/null +++ b/webui/src/bug/Comment.js @@ -0,0 +1,43 @@ +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 { withStyles } from '@material-ui/core/styles' +import Typography from '@material-ui/core/Typography' +import gql from 'graphql-tag' +import React from 'react' + +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) -- cgit