diff options
author | Michael Muré <batolettre@gmail.com> | 2018-08-15 21:49:31 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-08-15 21:49:31 +0200 |
commit | cf9e83e74dc5f91b0e13fbdb79848925e68809a3 (patch) | |
tree | e3b832cf0f5f6e4f4756f4e757babda22d9091e0 /webui/src/Author.js | |
parent | 1984d4343db770fc2c8e251a81f1ab997a4c4d5e (diff) | |
download | git-bug-cf9e83e74dc5f91b0e13fbdb79848925e68809a3.tar.gz |
webui: display label changes in the timeline + cleaning evrywhere
Diffstat (limited to 'webui/src/Author.js')
-rw-r--r-- | webui/src/Author.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/webui/src/Author.js b/webui/src/Author.js new file mode 100644 index 00000000..37de7aa7 --- /dev/null +++ b/webui/src/Author.js @@ -0,0 +1,24 @@ +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) |