all: fixes error stack trace in dark mode
fixes
import React, { Component } from 'react';
import { Text, Box, Col } from '@tlon/indigo-react';
import { RouteComponentProps, withRouter } from 'react-router-dom';
+import styled from 'styled-components';
type ErrorProps = RouteComponentProps & {
code?: number | string,
@@ -8,6 +9,10 @@ type ErrorProps = RouteComponentProps & {
error?: Error
};
+const Summary = styled.summary`
+ color: ${ p => p.theme.colors.black };
+`;
+
class ErrorComponent extends Component<ErrorProps> {
render () {
const { code, error, history, description } = this.props;
@@ -25,8 +30,8 @@ class ErrorComponent extends Component<ErrorProps> {
<Text fontFamily="mono"><code>&ldquo;{error.message}&rdquo;</code></Text>
</Box>
<details>
- <summary>Stack trace</summary>
- <pre style={{ wordWrap: 'break-word', overflowX: 'scroll' }} className="tl">{error.stack}</pre>
+ <Summary>Stack trace</Summary>
+ <Text><pre style={{ wordWrap: 'break-word', overflowX: 'scroll' }} className="tl">{error.stack}</pre></Text>
</details>
</Box>
)}
