@@ -2,15 +2,15 @@ import React from 'react';
22
33import Header from './Header' ;
44import Loader from './Loader' ;
5- import Section from './Section' ;
65import OutputPrism from './OutputPrism' ;
6+ import Section from './Section' ;
77
88interface HighlightErrorsProps {
9- children : React . ReactNode ;
9+ children ?: string ;
1010 label : string ;
1111}
1212
13- const onOutputPrismCopy : React . ClipboardEventHandler = event => {
13+ const onOutputPrismCopy : React . ClipboardEventHandler = ( event ) => {
1414 // Blank out HTML copy data.
1515 // Though linkified output is handy in the Playground, it does more harm
1616 // than good when copied elsewhere, and terminal output is usable on its own.
@@ -24,9 +24,7 @@ const onOutputPrismCopy: React.ClipboardEventHandler = event => {
2424const HighlightErrors : React . FC < HighlightErrorsProps > = ( { label, children } ) => (
2525 < div data-test-id = "output-stderr" onCopy = { onOutputPrismCopy } >
2626 < Header label = { label } />
27- < OutputPrism languageCode = "language-rust_errors" >
28- { children }
29- </ OutputPrism >
27+ < OutputPrism language = "rust_errors" > { children } </ OutputPrism >
3028 </ div >
3129) ;
3230
@@ -42,12 +40,16 @@ export interface ReallySimplePaneProps {
4240 error ?: string ;
4341}
4442
45- const SimplePane : React . FC < SimplePaneProps > = props => (
43+ const SimplePane : React . FC < SimplePaneProps > = ( props ) => (
4644 < 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 >
4949 < 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 >
5153 { props . children }
5254 </ div >
5355) ;
0 commit comments