Add notification when merging changes into the tree
This commit is contained in:
@@ -6,6 +6,7 @@ import { green, red } from '@material-ui/core/colors'
|
||||
|
||||
interface Props {
|
||||
message?: string
|
||||
type: 'error' | 'notification'
|
||||
onClose: () => void
|
||||
classes: any
|
||||
}
|
||||
@@ -16,7 +17,7 @@ class Notification extends React.Component<Props, {}> {
|
||||
}
|
||||
|
||||
public static styles = (theme: Theme) => ({
|
||||
success: {
|
||||
notification: {
|
||||
backgroundColor: green[600],
|
||||
color: theme.typography.button.color,
|
||||
},
|
||||
@@ -40,7 +41,7 @@ class Notification extends React.Component<Props, {}> {
|
||||
onClose={this.props.onClose}
|
||||
>
|
||||
<SnackbarContent
|
||||
className={this.props.classes.error}
|
||||
className={this.props.type === 'error' ? this.props.classes.error : this.props.classes.notification}
|
||||
message={this.props.message}
|
||||
/>
|
||||
</Snackbar>
|
||||
|
||||
Reference in New Issue
Block a user