Refactor notification
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user