import clsx from 'clsx'; import React from 'react'; type HealthStatus = 'health' | 'error' | 'warning' | 'none'; export interface HealthBarBeat { title?: string; status: HealthStatus; } export interface HealthBarProps { size?: 'small' | 'large'; beats: HealthBarBeat[]; } export const HealthBar: React.FC = React.memo((props) => { const size = props.size ?? 'small'; return (
{props.beats.map((beat, i) => (
))}
); }); HealthBar.displayName = 'HealthBar';