feat(badge-component): Badge mit color-variants [tsc:fail]

This commit is contained in:
Dennis (via Claude+Gemma) 2026-05-23 09:38:54 +02:00
parent 14bb8fd16a
commit d8ae2e0200
3 changed files with 59 additions and 2 deletions

View File

@ -1,5 +1,8 @@
{
"completed_features": [],
"current_feature": "tooltip-component",
"started_at": "2026-05-23T09:38:26.946771"
"current_feature": "badge-component",
"started_at": "2026-05-23T09:38:26.946771",
"attempted_features": [
"tooltip-component"
]
}

View File

@ -3579,3 +3579,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.
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>,
- `09:38:42` **INFO** Committed feature tooltip-component
- `09:38:42` **INFO** Pushed: rc=0
## Phase-3 Feature: badge-component (2026-05-23 09:38:42)
- `09:38:42` **INFO** Description: Badge mit color-variants
- `09:38:42` **INFO** Generating apps/web/src/components/Badge.tsx (Badge-Component. Props: variant ('default'|'success'|'warning'|'danger…)
- `09:38:52` **INFO** wrote 872 chars in 9.9s (attempt 1)
- `09:38:52` **INFO** Running tsc --noEmit on api…
- `09:38:54` **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>,

View File

@ -0,0 +1,36 @@
import React from 'react';
interface BadgeProps {
variant?: 'default' | 'success' | 'warning' | 'danger' | 'info';
children: React.ReactNode;
size?: 'sm' | 'md';
}
const variantStyles = {
default: 'bg-slate-100 text-slate-800 border-slate-200',
success: 'bg-green-100 text-green-800 border-green-200',
warning: 'bg-yellow-100 text-yellow-800 border-yellow-200',
danger: 'bg-red-100 text-red-800 border-red-200',
info: 'bg-blue-100 text-blue-800 border-blue-200',
};
const sizeStyles = {
sm: 'px-1.5 py-0 text-[10px]',
md: 'px-2 py-0.5 text-xs',
};
export default function Badge({
variant = 'default',
children,
size = 'md'
}: BadgeProps) {
return (
<span className={`
inline-flex items-center rounded-full font-medium border
${variantStyles[variant]}
${sizeStyles[size]}
`}>
{children}
</span>
);
}