import React from 'react'; import { formatNumber } from './helpers'; interface HBarProps { label: string; value: number; max: number; color?: string; suffix?: string; } const HBar = ({ label, value, max, color = '#B7007C', suffix = '', }: HBarProps): JSX.Element => { const pct = max > 0 ? (value / max) * 100 : 0; return (
{label} {formatNumber(value)} {suffix}
); }; export default HBar;