mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	10 second timeout on error-snackbar
This commit is contained in:
		
							parent
							
								
									f485e53bf0
								
							
						
					
					
						commit
						e621d98b71
					
				| @ -12,13 +12,16 @@ class ErrorComponent extends React.Component { | |||||||
|     render () { |     render () { | ||||||
|         const showError = this.props.errors.length > 0; |         const showError = this.props.errors.length > 0; | ||||||
|         const error = showError ? this.props.errors[0] : undefined; |         const error = showError ? this.props.errors[0] : undefined; | ||||||
|  |         const muteError = () => this.props.muteError(error); | ||||||
|         return ( |         return ( | ||||||
|             <Snackbar |             <Snackbar | ||||||
|                 action="Dismiss" |                 action="Dismiss" | ||||||
|                 active={showError} |                 active={showError} | ||||||
|                 icon="question_answer" |                 icon="question_answer" | ||||||
|  |                 timeout={10000} | ||||||
|                 label={error} |                 label={error} | ||||||
|                 onClick={() => this.props.muteError(error)} |                 onClick={muteError} | ||||||
|  |                 onTimeout={muteError} | ||||||
|                 type="warning" |                 type="warning" | ||||||
|             /> |             /> | ||||||
|         ); |         ); | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user