Error handling

This commit is contained in:
Scott E. Graves
2018-10-02 22:59:33 -05:00
parent 7e82690f5e
commit c55020fe0f
11 changed files with 158 additions and 64 deletions

View File

@@ -0,0 +1,11 @@
.Heading {
color: var(--text_color_error);
text-align: center;
margin-bottom: 4px;
}
.Content {
max-height: 60vh;
overflow-y: auto;
margin-bottom: 8px;
}

View File

@@ -0,0 +1,18 @@
import React from 'react';
import Box from '../UI/Box/Box';
import Button from '../UI/Button/Button';
import CSSModules from 'react-css-modules';
import styles from './ErrorDetails.css';
export default CSSModules((props) => {
return (
<Box dxStyle={{padding: '8px'}}>
<h1 styleName='Heading'>Application Error</h1>
<div styleName='Content'>
<p>{props.error.toString()}</p>
</div>
<Button clicked={props.closed}>Dismiss</Button>
</Box>
);
}, styles, {allowMultiple: true});