From d8ae2e0200bc569d9ee2d94511cac26c3a6eb789 Mon Sep 17 00:00:00 2001 From: "Dennis (via Claude+Gemma)" Date: Sat, 23 May 2026 09:38:54 +0200 Subject: [PATCH] feat(badge-component): Badge mit color-variants [tsc:fail] --- .phase32-state.json | 7 ++++-- GENERATION_LOG.md | 18 ++++++++++++++++ apps/web/src/components/Badge.tsx | 36 +++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 apps/web/src/components/Badge.tsx diff --git a/.phase32-state.json b/.phase32-state.json index 7e1bfb2..9698c14 100644 --- a/.phase32-state.json +++ b/.phase32-state.json @@ -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" + ] } \ No newline at end of file diff --git a/GENERATION_LOG.md b/GENERATION_LOG.md index b8a25a7..4e14c30 100644 --- a/GENERATION_LOG.md +++ b/GENERATION_LOG.md @@ -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' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'. Type 'Promise' provides no match for the signature '(instance: FastifyInstance, +- `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' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'. + Type 'Promise' provides no match for the signature '(instance: FastifyInstance, diff --git a/apps/web/src/components/Badge.tsx b/apps/web/src/components/Badge.tsx new file mode 100644 index 0000000..2679221 --- /dev/null +++ b/apps/web/src/components/Badge.tsx @@ -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 ( + + {children} + + ); +} \ No newline at end of file