import { EuiEmptyPrompt , EuiEmptyPromptProps } from '@elastic/eui' ; import { i18n } from '@kbn/i18n' ; import React from 'react' ; interface Props { heading ? : string ; subheading ? : EuiEmptyPromptProps [ 'body' ] ; hideSubheading ? : boolean ; } function EmptyMessage ( { heading = i18n . translate ( 'xpack.apm.emptyMessage.noDataFoundLabel' , { defaultMessage : 'No data found.' , } ) , subheading = i18n . translate ( 'xpack.apm.emptyMessage.noDataFoundDescription' , { defaultMessage : 'Try another time range or reset the search filter.' , } ) , hideSubheading = false , } ) { return ( < EuiEmptyPrompt titleSize = "s" title = { < div > { heading } < /div>} body={!hideSubheading && subheading}/ > ) ; } export { EmptyMessage } ;