From d79ef7a7945ba82caeec62cad44dad134c9edfbc Mon Sep 17 00:00:00 2001 From: Quentin Gliech Date: Wed, 10 Apr 2019 21:19:45 +0200 Subject: webui: Migrate to Material-UI's new style API --- webui/src/bug/SetTitle.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'webui/src/bug/SetTitle.js') diff --git a/webui/src/bug/SetTitle.js b/webui/src/bug/SetTitle.js index f5c48568..d9a09ad5 100644 --- a/webui/src/bug/SetTitle.js +++ b/webui/src/bug/SetTitle.js @@ -1,10 +1,10 @@ -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, @@ -12,9 +12,10 @@ const styles = theme => ({ bold: { fontWeight: 'bold', }, -}); +})); -const SetTitle = ({ op, classes }) => { +function SetTitle({ op }) { + const classes = useStyles(); return (
@@ -25,7 +26,7 @@ const SetTitle = ({ op, classes }) => {
); -}; +} SetTitle.fragment = gql` fragment SetTitle on TimelineItem { @@ -42,4 +43,4 @@ SetTitle.fragment = gql` } `; -export default withStyles(styles)(SetTitle); +export default SetTitle; -- cgit