@@ -14,6 +14,7 @@ import {
14
14
FormBuilder ,
15
15
PredefinedGallery ,
16
16
} from '@ginkgo-bioworks/react-json-schema-form-builder' ;
17
+ import withStyles from 'react-jss' ;
17
18
import Tabs from './tabs/Tabs' ;
18
19
import JSONInput from 'react-json-editor-ajrm' ;
19
20
import locale from 'react-json-editor-ajrm/locale/en' ;
@@ -30,6 +31,7 @@ type Props = {
30
31
uischemaTitle ?: string ,
31
32
width ?: string ,
32
33
height ?: string ,
34
+ classes : { [ string ] : any } ,
33
35
} ;
34
36
35
37
type State = {
@@ -55,6 +57,14 @@ function checkError(text: string, language: string) {
55
57
return '' ;
56
58
}
57
59
60
+ const styles = {
61
+ codeViewer : {
62
+ backgroundColor : 'lightgray' ,
63
+ maxHeight : '550px' ,
64
+ overflowY : 'auto' ,
65
+ } ,
66
+ } ;
67
+
58
68
class JsonSchemaFormEditor extends React . Component < Props , State > {
59
69
constructor ( props : Props ) {
60
70
super ( props ) ;
@@ -210,12 +220,9 @@ class JsonSchemaFormEditor extends React.Component<Props, State> {
210
220
errMessage = { 'Error parsing JSON Schema Form output' }
211
221
>
212
222
< h4 > Output Data</ h4 >
213
- < JSONInput
214
- id = 'a_unique_id'
215
- placeholder = { this . state . submissionData }
216
- locale = { locale }
217
- height = '550px'
218
- />
223
+ < pre className = { this . props . classes . codeViewer } >
224
+ { JSON . stringify ( this . state . submissionData , null , 2 ) }
225
+ </ pre >
219
226
</ ErrorBoundary >
220
227
< br />
221
228
</ div >
@@ -344,4 +351,4 @@ class JsonSchemaFormEditor extends React.Component<Props, State> {
344
351
}
345
352
}
346
353
347
- export default JsonSchemaFormEditor ;
354
+ export default withStyles ( styles ) ( JsonSchemaFormEditor ) ;
0 commit comments