Support sentence case names for known processors (#74847)
This commit is contained in:
parent
fb2b9a46af
commit
0e5ac40b00
|
@ -7,17 +7,19 @@
|
|||
import React, { FunctionComponent, memo } from 'react';
|
||||
import { EuiPanel, EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui';
|
||||
import { ProcessorInternal } from '../../types';
|
||||
import { getProcessorDescriptor } from '../shared';
|
||||
|
||||
interface Props {
|
||||
processor: ProcessorInternal;
|
||||
}
|
||||
|
||||
export const ProcessorInformation: FunctionComponent<Props> = memo(({ processor }) => {
|
||||
const label = getProcessorDescriptor(processor.type)?.label ?? processor.type;
|
||||
return (
|
||||
<EuiPanel>
|
||||
<EuiFlexGroup justifyContent="center" alignItems="center" responsive={false} gutterSize="s">
|
||||
<EuiFlexItem grow={false}>
|
||||
<b>{processor.type}</b>
|
||||
<b>{label}</b>
|
||||
</EuiFlexItem>
|
||||
{processor.options.description ? (
|
||||
<EuiFlexItem grow={false}>
|
||||
|
|
Loading…
Reference in a new issue