import { EuiFlexGroup , EuiFlexItem , EuiText } from '@elastic/eui' ; import React , { ComponentProps } from 'react' ; import { SparkPlot } from './charts/spark_plot' ; interface ListMetricProps extends ComponentProps < typeof SparkPlot > { hideSeries ? : boolean ; } export function ListMetric ( props ) { const { hideSeries , ... sparkPlotProps } = props ; const { valueLabel } = sparkPlotProps ; if ( ! hideSeries ) { return < SparkPlot { ... sparkPlotProps } / > ; } return ( < EuiFlexGroup gutterSize = "none" alignItems = "flexEnd" > < EuiFlexItem > < EuiText size = "s" textAlign = "right" > { valueLabel } < /EuiText> < /EuiFlexItem> < /EuiFlexGroup>); }