mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-12-02 21:25:26 +09:00
Per docs/plans/FRONTEND_UX_TAILWIND_CLEANUP_PLAN.md §8.5. React 18's automatic JSX runtime makes 'import React' unnecessary; removed it from the 142 files eslint flagged as 'React defined but never used' (named imports like useState preserved). Driven by an eslint --format json pass so only flagged files were touched. Lint warnings: 1603 -> 1461 (0 errors). Verified: npm run build passes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
13 lines
417 B
React
13 lines
417 B
React
|
|
export function ProgressBar({ percent = 0, color, className = '' }) {
|
|
const clamped = Math.max(0, Math.min(100, Number(percent) || 0));
|
|
const fillStyle = { width: `${clamped}%`, ...(color && { background: color }) };
|
|
return (
|
|
<div className={`progress-bar ${className}`.trim()}>
|
|
<div className="progress-fill" style={fillStyle} />
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default ProgressBar;
|