import type { CSSProperties } from 'react'; /** "N of M answered" beside a shared progress bar; the text carries the meaning, the bar repeats it. */ export const TaskProgress = ({ answered, total, label }: { answered: number; total: number; label: string }) => { const share = total > 0 ? Math.min(100, Math.round((answered / total) * 100)) : 0; return (
{label} {/* runtime-style: the fill's width is the answered share, known only from the form's values. */}
); }; export default TaskProgress;