@@ -2,15 +2,15 @@ import React from 'react';
2
2
3
3
import Header from './Header' ;
4
4
import Loader from './Loader' ;
5
- import Section from './Section' ;
6
5
import OutputPrism from './OutputPrism' ;
6
+ import Section from './Section' ;
7
7
8
8
interface HighlightErrorsProps {
9
- children : React . ReactNode ;
9
+ children ?: string ;
10
10
label : string ;
11
11
}
12
12
13
- const onOutputPrismCopy : React . ClipboardEventHandler = event => {
13
+ const onOutputPrismCopy : React . ClipboardEventHandler = ( event ) => {
14
14
// Blank out HTML copy data.
15
15
// Though linkified output is handy in the Playground, it does more harm
16
16
// than good when copied elsewhere, and terminal output is usable on its own.
@@ -24,9 +24,7 @@ const onOutputPrismCopy: React.ClipboardEventHandler = event => {
24
24
const HighlightErrors : React . FC < HighlightErrorsProps > = ( { label, children } ) => (
25
25
< div data-test-id = "output-stderr" onCopy = { onOutputPrismCopy } >
26
26
< Header label = { label } />
27
- < OutputPrism languageCode = "language-rust_errors" >
28
- { children }
29
- </ OutputPrism >
27
+ < OutputPrism language = "rust_errors" > { children } </ OutputPrism >
30
28
</ div >
31
29
) ;
32
30
@@ -42,12 +40,16 @@ export interface ReallySimplePaneProps {
42
40
error ?: string ;
43
41
}
44
42
45
- const SimplePane : React . FC < SimplePaneProps > = props => (
43
+ const SimplePane : React . FC < SimplePaneProps > = ( props ) => (
46
44
< div data-test-id = { `output-${ props . kind } ` } >
47
- { ( props . requestsInProgress > 0 ) && < Loader /> }
48
- < Section kind = "error" label = "Errors" > { props . error } </ Section >
45
+ { props . requestsInProgress > 0 && < Loader /> }
46
+ < Section kind = "error" label = "Errors" >
47
+ { props . error }
48
+ </ Section >
49
49
< HighlightErrors label = "Standard Error" > { props . stderr } </ HighlightErrors >
50
- < Section kind = "stdout" label = "Standard Output" > { props . stdout } </ Section >
50
+ < Section kind = "stdout" label = "Standard Output" >
51
+ { props . stdout }
52
+ </ Section >
51
53
{ props . children }
52
54
</ div >
53
55
) ;
0 commit comments