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

Co-authored-by: Alison Goryachev <alison.goryachev@elastic.co>
This commit is contained in:
CJ Cenizal 2020-03-17 18:04:56 -07:00 committed by GitHub
parent 6582ff435d
commit afae0da83a
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>;
}
}