Refactor notification

This commit is contained in:
Thomas Nordquist
2019-04-08 09:00:23 +02:00
parent e4cfa38139
commit c23099e254
2 changed files with 2 additions and 18 deletions

View File

@@ -22,7 +22,7 @@ class Notification extends React.Component<Props, {}> {
color: theme.typography.button.color,
},
error: {
backgroundColor: red[600],
backgroundColor: theme.palette.error.main,
color: theme.typography.button.color,
},
})
@@ -37,7 +37,7 @@ class Notification extends React.Component<Props, {}> {
<Snackbar
anchorOrigin={snackbarAnchor}
open={Boolean(this.props.message)}
autoHideDuration={10000}
autoHideDuration={this.props.type === 'error' ? 10000 : 3000}
onClose={this.props.onClose}
>
<SnackbarContent

View File

@@ -28,22 +28,6 @@ class PauseButton extends React.Component<Props, {changes: number}> {
this.state = { changes: 0 }
}
private renderResume() {
return (
<Tooltip title="Resumes updating the tree, after applying all recorded changes">
<Resume />
</Tooltip>
)
}
private renderPause() {
return (
<Tooltip title="Stops all updates, records changes until the buffer is full.">
<Pause />
</Tooltip>
)
}
private renderBufferStats() {
if (!this.props.tree) {
return