@@ -28,6 +28,8 @@ import queryParamsStore from './stores/queryParamsStore';
2828import { useDebounce } from 'use-debounce' ;
2929import { initWorkers } from './monacoWorker' ;
3030import NewPlaygroundSplitPane from './PlaygroundSplitPane' ;
31+ import { lightTheme as reactJsonLightTheme } from '@uiw/react-json-view/light' ;
32+ import { vscodeTheme as reactJsonDarkTheme } from '@uiw/react-json-view/vscode' ;
3133
3234const App : React . FC = ( ) => {
3335 const [ defaultValue , setDefaultValue ] = useDefaultEditorValue ( ) ;
@@ -78,7 +80,7 @@ const App: React.FC = () => {
7880 useEffect ( ( ) => {
7981 setReactJsonOptions ( {
8082 ...reactJsonOptions ,
81- theme : UISchema . appBar [ 'ui:darkMode' ] ? 'summerfruit' : 'summerfruit:inverted' ,
83+ style : UISchema . appBar [ 'ui:darkMode' ] ? reactJsonDarkTheme : reactJsonLightTheme ,
8284 } ) ;
8385 } , [ UISchema . appBar [ 'ui:darkMode' ] ] ) ;
8486
@@ -104,12 +106,11 @@ const App: React.FC = () => {
104106 setParsedSchema ( defaultValue || '' ) ;
105107 } , [ defaultValue ] ) ;
106108 const [ reactJsonOptions , setReactJsonOptions ] = useState ( {
107- theme : 'summerfruit:inverted' ,
108- collapseStringsAfterLength : 25 ,
109+ style : reactJsonDarkTheme ,
110+ shortenTextAfterLength : 25 ,
109111 displayDataTypes : false ,
110112 displayObjectSize : false ,
111113 indentWidth : 2 ,
112- name : false ,
113114 } ) ;
114115 const [ transportList , setTransportList ] = useState ( defaultTransports ) ;
115116 const getQueryTransport = ( ) => {
@@ -234,7 +235,7 @@ const App: React.FC = () => {
234235 uiSchema = { UISchema }
235236 reactJsonOptions = { {
236237 ...reactJsonOptions ,
237- theme : UISchema . appBar [ 'ui:darkMode' ] ? 'summerfruit' : 'summerfruit:inverted' ,
238+ style : UISchema . appBar [ 'ui:darkMode' ] ? reactJsonDarkTheme : reactJsonLightTheme ,
238239 } }
239240 methodPlugins = {
240241 UISchema . methods [ 'ui:methodPlugins' ]
0 commit comments