import React from 'react'; import { Layer, Tile } from '@carbon/react'; import { ArrowRight } from '@carbon/react/icons'; import { ConfigurableLink } from '@openmrs/esm-framework'; import styles from './metrics-card.scss'; interface MetricsCardProps { children?: React.ReactNode; } export const MetricsCard: React.FC = ({ children }) => { return ( {children} ); }; interface MetricsCardHeaderProps { title: string; link?: string; linkText?: string; } export const MetricsCardHeader: React.FC = ({ title, link, linkText }) => { return (
{link && (
{linkText}
)}
); }; interface MetricsCardBodyProps { children?: React.ReactNode; } export const MetricsCardBody: React.FC = ({ children }) => { return
{children}
; }; interface MetricsCardItemProps { /** If the value is null, the item will not be rendered. */ value: number | string | null; } export const MetricsCardItem: React.FC = ({ value }) => { if (value === null) { return null; } return (

{value}

); };