{"size": 848, "ext": "js", "max_stars_repo_path": "app/mithril/src/client/preview/error_display.js", "max_stars_repo_name": "WhitePrime/StoryBook", "max_stars_repo_stars_event_min_datetime": "2018-09-18T06:39:30.000Z", "max_stars_repo_stars_event_max_datetime": "2018-09-18T06:39:30.000Z", "max_issues_repo_path": "app/mithril/src/client/preview/error_display.js", "max_issues_repo_name": "WhitePrime/StoryBook", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/mithril/src/client/preview/error_display.js", "max_forks_repo_name": "WhitePrime/StoryBook", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 18.4347826087, "max_line_length": 76, "alphanum_fraction": 0.6061320755}
/** @jsx m */

import m from 'mithril';

const mainStyle = {
  position: 'fixed',
  top: 0,
  bottom: 0,
  left: 0,
  right: 0,
  padding: 20,
  backgroundColor: 'rgb(187, 49, 49)',
  color: '#FFF',
  WebkitFontSmoothing: 'antialiased',
};

const headingStyle = {
  fontSize: 20,
  fontWeight: 600,
  letterSpacing: 0.2,
  margin: '10px 0',
  fontFamily: `
    -apple-system, ".SFNSText-Regular", "San Francisco", Roboto, "Segoe UI",
    "Helvetica Neue", "Lucida Grande", sans-serif
    `,
};

const codeStyle = {
  fontSize: 14,
  width: '100vw',
  overflow: 'auto',
};

const ErrorDisplay = {
  view: vnode => (
    <div style={mainStyle}>
      <div style={headingStyle}>{vnode.attrs.error.message}</div>
      <pre style={codeStyle}>
        <code>{vnode.attrs.error.stack}</code>
      </pre>
    </div>
  ),
};

export default ErrorDisplay;
