feat(progress-bar-component): ProgressBar mit Animation [tsc:fail]
This commit is contained in:
parent
eb8f225e85
commit
304e86dd42
@ -1,9 +1,10 @@
|
|||||||
{
|
{
|
||||||
"completed_features": [],
|
"completed_features": [],
|
||||||
"current_feature": "alert-component",
|
"current_feature": "progress-bar-component",
|
||||||
"started_at": "2026-05-23T09:48:28.280761",
|
"started_at": "2026-05-23T09:48:28.280761",
|
||||||
"attempted_features": [
|
"attempted_features": [
|
||||||
"tabs-component",
|
"tabs-component",
|
||||||
"accordion-component"
|
"accordion-component",
|
||||||
|
"alert-component"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -3773,3 +3773,21 @@ src/index.ts(27,25): error TS2769: No overload matches this call.
|
|||||||
Overload 1 of 3, '(plugin: FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error.
|
Overload 1 of 3, '(plugin: FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error.
|
||||||
Argument of type 'Promise<FastifyMultipartPlugin>' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'.
|
Argument of type 'Promise<FastifyMultipartPlugin>' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'.
|
||||||
Type 'Promise<FastifyMultipartPlugin>' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>,
|
Type 'Promise<FastifyMultipartPlugin>' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>,
|
||||||
|
- `09:49:22` **INFO** Committed feature alert-component
|
||||||
|
- `09:49:22` **INFO** Pushed: rc=0
|
||||||
|
|
||||||
|
## Phase-3 Feature: progress-bar-component (2026-05-23 09:49:22)
|
||||||
|
|
||||||
|
- `09:49:22` **INFO** Description: ProgressBar mit Animation
|
||||||
|
- `09:49:22` **INFO** Generating apps/web/src/components/ProgressBar.tsx (ProgressBar-Component. Props: value (0-100), max?: number (default 100…)
|
||||||
|
- `09:49:32` **INFO** wrote 997 chars in 9.7s (attempt 1)
|
||||||
|
- `09:49:32` **INFO** Running tsc --noEmit on api…
|
||||||
|
- `09:49:34` **WARN** tsc errors:
|
||||||
|
src/db/schema.ts(37,14): error TS7022: 'customers' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
|
||||||
|
src/db/schema.ts(45,59): error TS7024: Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.
|
||||||
|
src/db/schema.ts(49,14): error TS7022: 'projects' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
|
||||||
|
src/db/schema.ts(53,56): error TS7024: Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.
|
||||||
|
src/index.ts(27,25): error TS2769: No overload matches this call.
|
||||||
|
Overload 1 of 3, '(plugin: FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error.
|
||||||
|
Argument of type 'Promise<FastifyMultipartPlugin>' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'.
|
||||||
|
Type 'Promise<FastifyMultipartPlugin>' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>,
|
||||||
|
|||||||
41
apps/web/src/components/ProgressBar.tsx
Normal file
41
apps/web/src/components/ProgressBar.tsx
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
interface ProgressBarProps {
|
||||||
|
value: number;
|
||||||
|
max?: number;
|
||||||
|
color?: 'blue' | 'green' | 'red';
|
||||||
|
showLabel?: boolean;
|
||||||
|
animated?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
const colorMap = {
|
||||||
|
blue: 'bg-blue-500',
|
||||||
|
green: 'bg-green-500',
|
||||||
|
red: 'bg-red-500',
|
||||||
|
};
|
||||||
|
|
||||||
|
export default function ProgressBar({
|
||||||
|
value,
|
||||||
|
max = 100,
|
||||||
|
color = 'blue',
|
||||||
|
showLabel = false,
|
||||||
|
animated = true,
|
||||||
|
}: ProgressBarProps) {
|
||||||
|
const percentage = Math.min(Math.max((value / max) * 100, 0), 100);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="relative w-full h-4 bg-zinc-200 rounded-full overflow-hidden">
|
||||||
|
<div
|
||||||
|
className={`h-full ${colorMap[color]} ${
|
||||||
|
animated ? 'transition-all duration-300 ease-out' : ''
|
||||||
|
}`}
|
||||||
|
style={{ width: `${percentage}%` }}
|
||||||
|
/>
|
||||||
|
{showLabel && (
|
||||||
|
<span className="absolute inset-0 flex items-center justify-center text-[10px] font-medium text-zinc-600 pointer-events-none">
|
||||||
|
{Math.round(percentage)}%
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user