Fix pause icon alignment

This commit is contained in:
Thomas Nordquist
2019-04-10 13:59:57 +02:00
parent c7b0400e84
commit ab8365b1f7
2 changed files with 10 additions and 5 deletions

View File

@@ -10,7 +10,12 @@ import { treeActions } from '../../actions'
import { StyleRulesCallback, withStyles } from '@material-ui/core/styles'
import { Tooltip } from '@material-ui/core'
const styles: StyleRulesCallback = theme => ({ })
const styles: StyleRulesCallback = theme => ({
icon: {
color: theme.palette.primary.contrastText,
verticalAlign: 'middle' as 'middle',
},
})
interface Props {
classes: any
@@ -66,7 +71,7 @@ class PauseButton extends React.Component<Props, {changes: number}> {
<CustomIconButton onClick={this.props.actions.tree.togglePause} >
<Tooltip title={message}>
<div /* Required so tooltip does not loose the anchor when the icon changes */>
{this.props.paused ? <Resume /> : <Pause />}
{this.props.paused ? <Resume className={this.props.classes.icon} /> : <Pause className={this.props.classes.icon} />}
</div>
</Tooltip>
</CustomIconButton>