diff options
author | Quentin Gliech <quentingliech@gmail.com> | 2019-04-10 21:19:45 +0200 |
---|---|---|
committer | Quentin Gliech <quentingliech@gmail.com> | 2019-05-22 19:52:01 +0200 |
commit | d79ef7a7945ba82caeec62cad44dad134c9edfbc (patch) | |
tree | 392d9ceaead2a5780862ecf89cf1cc2a0c550ed7 /webui/src/bug/SetStatus.js | |
parent | 1a7ccd594adc6f185115ce12a4368c55ff418678 (diff) | |
download | git-bug-d79ef7a7945ba82caeec62cad44dad134c9edfbc.tar.gz |
webui: Migrate to Material-UI's new style API
Diffstat (limited to 'webui/src/bug/SetStatus.js')
-rw-r--r-- | webui/src/bug/SetStatus.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/webui/src/bug/SetStatus.js b/webui/src/bug/SetStatus.js index 58b81630..ab591038 100644 --- a/webui/src/bug/SetStatus.js +++ b/webui/src/bug/SetStatus.js @@ -1,17 +1,18 @@ -import { withStyles } from '@material-ui/core/styles'; +import { makeStyles } from '@material-ui/styles'; import gql from 'graphql-tag'; import React from 'react'; import Author from '../Author'; import Date from '../Date'; -const styles = theme => ({ +const useStyles = makeStyles(theme => ({ main: { ...theme.typography.body2, marginLeft: theme.spacing.unit + 40, }, -}); +})); -const SetStatus = ({ op, classes }) => { +function SetStatus({ op }) { + const classes = useStyles(); return ( <div className={classes.main}> <Author author={op.author} bold /> @@ -19,7 +20,7 @@ const SetStatus = ({ op, classes }) => { <Date date={op.date} /> </div> ); -}; +} SetStatus.fragment = gql` fragment SetStatus on TimelineItem { @@ -35,4 +36,4 @@ SetStatus.fragment = gql` } `; -export default withStyles(styles)(SetStatus); +export default SetStatus; |