[IM] Use EuiCodeBlock to render index mapping (#60420) (#60458)

This commit is contained in:
Alison Goryachev 2020-03-17 21:36:32 -04:00 committed by GitHub
parent f8feddbd22
commit b5959fc98f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,7 +5,7 @@
*/
import React from 'react';
import { EuiCodeEditor } from '@elastic/eui';
import { EuiCodeBlock } from '@elastic/eui';
import 'brace/theme/textmate';
@ -25,17 +25,6 @@ export class ShowJson extends React.PureComponent {
return null;
}
const json = JSON.stringify(data, null, 2);
return (
<EuiCodeEditor
mode="json"
theme="textmate"
isReadOnly
setOptions={{ maxLines: Infinity }}
value={json}
editorProps={{
$blockScrolling: Infinity,
}}
/>
);
return <EuiCodeBlock lang="json">{json}</EuiCodeBlock>;
}
}