import React from 'react'; import { clsx } from 'clsx'; import { twMerge } from 'tailwind-merge'; export type ProgressColor = 'indigo' | 'emerald'; export interface ProgressBarProps { percent?: number; // 0–100, ignored in indeterminate mode color?: ProgressColor; indeterminate?: boolean; className?: string; height?: 'sm' | 'md' | 'lg'; } const colorMap: Record = { indigo: 'bg-indigo-500', emerald: 'bg-emerald-500', }; const heightMap: Record = { sm: 'h-1', md: 'h-2', lg: 'h-3', }; export const ProgressBar: React.FC = ({ percent = 0, color = 'indigo', indeterminate = false, className, height = 'md', }) => { const clamped = Math.max(0, Math.min(100, percent)); return (
); }; ProgressBar.displayName = 'ProgressBar';