import React from 'react' ; import { EuiFlexGroup , EuiFlexItem , EuiPanel , EuiStat } from '@elastic/eui' ; interface Props { stats : Array < { text : string ; stat : number ; dataTestSubj ? : string ; } > ; } export const AnalyticsCards = ( { stats } ) => ( < EuiFlexGroup direction = "column" > { stats . map ( ( { text , stat , dataTestSubj } ) => ( < EuiFlexItem key = { text } > < EuiPanel color = "subdued" hasShadow = { false } > < EuiStat title = { stat } description = { text } titleColor = "primary" data - test - subj = { dataTestSubj } / > < /EuiPanel> < /EuiFlexItem>))} < /EuiFlexGroup>);