1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

10 second timeout on error-snackbar

This commit is contained in:
ivaosthu 2016-11-24 20:41:05 +01:00
parent f485e53bf0
commit e621d98b71

View File

@ -12,13 +12,16 @@ class ErrorComponent extends React.Component {
render () {
const showError = this.props.errors.length > 0;
const error = showError ? this.props.errors[0] : undefined;
const muteError = () => this.props.muteError(error);
return (
<Snackbar
action="Dismiss"
active={showError}
icon="question_answer"
timeout={10000}
label={error}
onClick={() => this.props.muteError(error)}
onClick={muteError}
onTimeout={muteError}
type="warning"
/>
);