Refactor notification
This commit is contained in:
@@ -22,7 +22,7 @@ class Notification extends React.Component<Props, {}> {
|
|||||||
color: theme.typography.button.color,
|
color: theme.typography.button.color,
|
||||||
},
|
},
|
||||||
error: {
|
error: {
|
||||||
backgroundColor: red[600],
|
backgroundColor: theme.palette.error.main,
|
||||||
color: theme.typography.button.color,
|
color: theme.typography.button.color,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@@ -37,7 +37,7 @@ class Notification extends React.Component<Props, {}> {
|
|||||||
<Snackbar
|
<Snackbar
|
||||||
anchorOrigin={snackbarAnchor}
|
anchorOrigin={snackbarAnchor}
|
||||||
open={Boolean(this.props.message)}
|
open={Boolean(this.props.message)}
|
||||||
autoHideDuration={10000}
|
autoHideDuration={this.props.type === 'error' ? 10000 : 3000}
|
||||||
onClose={this.props.onClose}
|
onClose={this.props.onClose}
|
||||||
>
|
>
|
||||||
<SnackbarContent
|
<SnackbarContent
|
||||||
|
|||||||
@@ -28,22 +28,6 @@ class PauseButton extends React.Component<Props, {changes: number}> {
|
|||||||
this.state = { changes: 0 }
|
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() {
|
private renderBufferStats() {
|
||||||
if (!this.props.tree) {
|
if (!this.props.tree) {
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user