feat(toolbar-button-component): ToolbarButton mit Tooltip + Icon [tsc:fail]

This commit is contained in:
Dennis (via Claude+Gemma) 2026-05-23 10:24:02 +02:00
parent 153151a9f1
commit ffae5f8dd5
3 changed files with 59 additions and 2 deletions

View File

@ -1,8 +1,9 @@
{ {
"completed_features": [], "completed_features": [],
"current_feature": "stat-card-component", "current_feature": "toolbar-button-component",
"started_at": "2026-05-23T10:23:26.274445", "started_at": "2026-05-23T10:23:26.274445",
"attempted_features": [ "attempted_features": [
"page-header-component" "page-header-component",
"stat-card-component"
] ]
} }

View File

@ -4308,3 +4308,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>,
- `10:23:51` **INFO** Committed feature stat-card-component
- `10:23:51` **INFO** Pushed: rc=0
## Phase-3 Feature: toolbar-button-component (2026-05-23 10:23:51)
- `10:23:51` **INFO** Description: ToolbarButton mit Tooltip + Icon
- `10:23:51` **INFO** Generating apps/web/src/components/ToolbarButton.tsx (ToolbarButton-Component. Props: icon (ReactNode), label, onClick, acti…)
- `10:24:00` **INFO** wrote 959 chars in 9.0s (attempt 1)
- `10:24:00` **INFO** Running tsc --noEmit on api…
- `10:24:02` **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,38 @@
import React from 'react';
interface ToolbarButtonProps {
icon: React.ReactNode;
label: string;
onClick: () => void;
active?: boolean;
disabled?: boolean;
}
export default function ToolbarButton({
icon,
label,
onClick,
active = false,
disabled = false,
}: ToolbarButtonProps) {
return (
<button
onClick={onClick}
disabled={disabled}
title={label}
className={`
relative flex items-center justify-center w-10 h-10 rounded-md transition-all duration-200
${disabled
? 'opacity-50 cursor-not-allowed bg-gray-100 text-gray-400'
: active
? 'bg-blue-100 text-blue-600 ring-2 ring-blue-500 ring-inset'
: 'bg-white text-gray-600 hover:bg-gray-100 hover:text-gray-900 border border-gray-200 shadow-sm'
}
`}
>
<span className="flex items-center justify-center pointer-events-none">
{icon}
</span>
</button>
);
}