* [ML] Sets max height and preserve whitespace in categorization wizard examples * [ML] Edit following review Co-authored-by: Pete Harverson <peteharverson@users.noreply.github.com>
This commit is contained in:
parent
b38fd69fdb
commit
f87445c999
|
@ -7,7 +7,7 @@
|
|||
|
||||
import React, { FC } from 'react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { EuiBasicTable, EuiText } from '@elastic/eui';
|
||||
import { EuiBasicTable, EuiCodeBlock } from '@elastic/eui';
|
||||
import { CategoryFieldExample } from '../../../../../../../../../common/types/categories';
|
||||
|
||||
interface Props {
|
||||
|
@ -31,9 +31,14 @@ export const FieldExamples: FC<Props> = ({ fieldExamples }) => {
|
|||
}
|
||||
),
|
||||
render: (example: any) => (
|
||||
<EuiText size="s">
|
||||
<code>{example}</code>
|
||||
</EuiText>
|
||||
<EuiCodeBlock
|
||||
fontSize="s"
|
||||
paddingSize="none"
|
||||
transparentBackground
|
||||
style={{ maxHeight: '200px' }} // Don't use overflowHeight as don't want to show the fullscreen button
|
||||
>
|
||||
{example}
|
||||
</EuiCodeBlock>
|
||||
),
|
||||
},
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue