import React from 'react' ; import { isEmpty } from 'lodash' ; import { i18n } from '@kbn/i18n' ; import { EuiText } from '@elastic/eui' ; import { KeyValueTable } from '../key_value_table' ; interface Props { properties : Array < { field : string ; value : string [ ] | number [ ] ; } > ; } export function Section ( { properties } ) { if ( ! isEmpty ( properties ) ) { return ( < KeyValueTable keyValuePairs = { properties . map ( ( property ) => ( { key : property . field , value : property . value , } ) ) } / > ) ; } return ( < EuiText size = "s" > { i18n . translate ( 'xpack.apm.propertiesTable.agentFeature.noDataAvailableLabel' , { defaultMessage : 'No data available' } ) } < /EuiText>); }