import React from 'react' ; import { EuiBadge } from '@elastic/eui' ; import { getServiceHealthStatusBadgeColor , getServiceHealthStatusLabel , ServiceHealthStatus , } from '../../../../../common/service_health_status' ; import { useTheme } from '../../../../hooks/use_theme' ; export function HealthBadge ( { healthStatus , } ) { const theme = useTheme ( ) ; return ( < EuiBadge color = { getServiceHealthStatusBadgeColor ( theme , healthStatus ) } > { getServiceHealthStatusLabel ( healthStatus ) } < /EuiBadge>); }