1
1
import React , { Component } from 'react' ;
2
2
import PropTypes from 'prop-types' ;
3
3
import { isShouldReportAsBugError } from '@mongosh/errors' ;
4
+ import { css , cx , palette } from '@mongodb-js/compass-components' ;
4
5
5
6
import { SimpleTypeOutput } from './simple-type-output' ;
6
7
import { Expandable } from '../utils/expandable' ;
@@ -10,6 +11,18 @@ interface ErrorOutputProps {
10
11
value : any ;
11
12
}
12
13
14
+ const errInfoCss = css ( {
15
+ '&&' : {
16
+ borderLeft : '3px solid' ,
17
+ paddingLeft : '0px' ,
18
+ borderColor : palette . red . light1 ,
19
+ } ,
20
+ } ) ;
21
+
22
+ const messageCss = css ( {
23
+ color : palette . white ,
24
+ } ) ;
25
+
13
26
export class ErrorOutput extends Component < ErrorOutputProps > {
14
27
static propTypes = {
15
28
value : PropTypes . any ,
@@ -30,7 +43,7 @@ export class ErrorOutput extends Component<ErrorOutputProps> {
30
43
>
31
44
{ formattedName || 'Error' } :
32
45
</ a > { ' ' }
33
- { message }
46
+ < span className = { messageCss } > { message } </ span >
34
47
</ pre >
35
48
</ div >
36
49
) ;
@@ -87,11 +100,11 @@ export class ErrorOutput extends Component<ErrorOutputProps> {
87
100
return (
88
101
< div >
89
102
{ this . renderCollapsed ( toggle ) }
90
- < div >
103
+ < div className = { messageCss } >
91
104
{ this . formatErrorBugReportInfo ( ) }
92
105
{ this . formatErrorInfo ( ) }
93
106
{ this . formatErrorResult ( ) }
94
- < pre > { this . formatStack ( ) } </ pre >
107
+ < pre className = { errInfoCss } > { this . formatStack ( ) } </ pre >
95
108
</ div >
96
109
</ div >
97
110
) ;
0 commit comments