Skip to content

Commit 712c16f

Browse files
committed
Add dark bg to json
1 parent 41ef644 commit 712c16f

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

xp-archive/client/contentView/ContentView.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import { ViewVariant } from 'client/viewSelector/ViewSelector';
3-
import { ContentJsonView } from 'client/contentView/contentJsonView/contentJsonView';
3+
import { ContentJsonView } from 'client/contentView/contentJsonView/ContentJsonView';
44
import { PdfExport } from 'client/contentView/pdfExport/PdfExport';
55
import { ContentServiceResponse } from 'shared/types';
66

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.container {
2+
background-color: black;
3+
height: 100%;
4+
}
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
import React from 'react';
2-
import { collapseAllNested, JsonView } from 'react-json-view-lite';
2+
import { collapseAllNested, JsonView, darkStyles } from 'react-json-view-lite';
33
import { Content } from 'shared/types';
44
import 'react-json-view-lite/dist/index.css';
5+
import style from './ContentJsonView.module.css';
56

67
type Props = {
78
json: Content;
89
};
910

1011
export const ContentJsonView = ({ json }: Props) => {
11-
return <JsonView data={json} clickToExpandNode={true} shouldExpandNode={collapseAllNested} />;
12+
return (
13+
<JsonView
14+
style={{ ...darkStyles, container: `${style.container}` }}
15+
data={json}
16+
clickToExpandNode={true}
17+
shouldExpandNode={collapseAllNested}
18+
/>
19+
);
1220
};

0 commit comments

Comments
 (0)