💄 style(DevPanel): improve json display (#7978)

This commit is contained in:
Kingsword
2025-05-27 00:10:15 +08:00
committed by GitHub
parent 286f96ad37
commit db800d2b63
@@ -9,7 +9,9 @@ interface JsonViewerProps {
const JsonViewer = memo<JsonViewerProps>(({ data }) => {
return (
<Flexbox style={{ overflow: 'scroll' }}>
<Highlighter language={'json'}>{JSON.stringify(data, null, 2)}</Highlighter>
<Highlighter language={'json'} style={{ overflow: 'scroll', whiteSpace: 'pre' }}>
{JSON.stringify(data, null, 2)}
</Highlighter>
</Flexbox>
);
});