import React from 'react'; import classNames from 'classnames'; 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; children?: React.ReactNode; link?: string; linkText?: string; } export const MetricsCardHeader: React.FC = ({ title, children, link, linkText }) => { return (
{children}
{link && (
{linkText}
)}
); }; interface MetricsCardBodyProps { children?: React.ReactNode; } export const MetricsCardBody: React.FC = ({ children }) => { return
{children}
; }; interface MetricsCardItemProps { label: string; /** If the value is null, the item will not be rendered. */ value: number | string | null; small?: boolean; color?: 'default' | 'red'; } export const MetricsCardItem: React.FC = ({ label, value, small, color }) => { if (value === null) { return null; } return (
{label}

{value}

); };