From 5dcdd363737fa90b1966163dbcb2372c35ad7007 Mon Sep 17 00:00:00 2001 From: "Dennis (via Claude+Gemma)" Date: Sat, 23 May 2026 10:19:40 +0200 Subject: [PATCH] =?UTF-8?q?feat(banner-component):=20Banner=20f=C3=BCr=20T?= =?UTF-8?q?op-Bar=20(e.g.=20Trial-Hinweis)=20[tsc:fail]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .phase40-state.json | 5 ++- GENERATION_LOG.md | 18 ++++++++ apps/web/src/components/Banner.tsx | 71 ++++++++++++++++++++++++++++++ 3 files changed, 92 insertions(+), 2 deletions(-) create mode 100644 apps/web/src/components/Banner.tsx diff --git a/.phase40-state.json b/.phase40-state.json index 8bca7e8..c0ea46f 100644 --- a/.phase40-state.json +++ b/.phase40-state.json @@ -1,9 +1,10 @@ { "completed_features": [], - "current_feature": "form-group-component", + "current_feature": "banner-component", "started_at": "2026-05-23T10:18:26.780535", "attempted_features": [ "sidebar-component", - "logo-component" + "logo-component", + "form-group-component" ] } \ No newline at end of file diff --git a/GENERATION_LOG.md b/GENERATION_LOG.md index 9f8df7b..18f7774 100644 --- a/GENERATION_LOG.md +++ b/GENERATION_LOG.md @@ -4247,3 +4247,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, +- `10:19:22` **INFO** Committed feature form-group-component +- `10:19:22` **INFO** Pushed: rc=0 + +## Phase-3 Feature: banner-component (2026-05-23 10:19:22) + +- `10:19:22` **INFO** Description: Banner für Top-Bar (e.g. Trial-Hinweis) +- `10:19:22` **INFO** Generating apps/web/src/components/Banner.tsx (Banner-Component. Props: message, variant?: 'info'|'warning'|'success'…) +- `10:19:39` **INFO** wrote 1985 chars in 16.6s (attempt 1) +- `10:19:39` **INFO** Running tsc --noEmit on api… +- `10:19:40` **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/Banner.tsx b/apps/web/src/components/Banner.tsx new file mode 100644 index 0000000..57a30e3 --- /dev/null +++ b/apps/web/src/components/Banner.tsx @@ -0,0 +1,71 @@ +import React, { useState } from 'react'; + +interface BannerProps { + message: string; + variant?: 'info' | 'warning' | 'success'; + actionLabel?: string; + onAction?: () => void; + dismissible?: boolean; +} + +const variantStyles = { + info: 'bg-blue-600 text-white', + warning: 'bg-amber-500 text-black', + success: 'bg-emerald-600 text-white', +}; + +export default function Banner({ + message, + variant = 'info', + actionLabel, + onAction, + dismissible = false, +}: BannerProps) { + const [isVisible, setIsVisible] = useState(true); + + if (!isVisible) return null; + + return ( +
+
+
+ {message} +
+ +
+ {actionLabel && onAction && ( + + )} + + {dismissible && ( + + )} +
+
+
+ ); +} \ No newline at end of file