aboutsummaryrefslogblamecommitdiffstats
path: root/webui/src/Author.js
blob: 0ad7e257f37b54301a15d433a263aac3c9b894fb (plain) (tree)
1
2
3
4
5
6
7
8
9


                                                        





                              


                       
 

                                                                         




                                                            

    
 
                                          
import Tooltip from '@material-ui/core/Tooltip/Tooltip';
import React from 'react';
import { withStyles } from '@material-ui/core/styles';

const styles = theme => ({
  author: {
    ...theme.typography.body2,
  },
  bold: {
    fontWeight: 'bold',
  },
});

const Author = ({ author, bold, classes }) => {
  const klass = bold ? [classes.author, classes.bold] : [classes.author];

  return (
    <Tooltip title={author.email}>
      <span className={klass.join(' ')}>{author.name}</span>
    </Tooltip>
  );
};

export default withStyles(styles)(Author);