feat(checkbox-component): Checkbox mit Label [tsc:fail]

This commit is contained in:
Dennis (via Claude+Gemma) 2026-05-23 09:53:55 +02:00
parent df55212a6d
commit aec1d96e66
3 changed files with 63 additions and 2 deletions

View File

@ -1,5 +1,8 @@
{
"completed_features": [],
"current_feature": "dropdown-menu-component",
"started_at": "2026-05-23T09:53:25.616963"
"current_feature": "checkbox-component",
"started_at": "2026-05-23T09:53:25.616963",
"attempted_features": [
"dropdown-menu-component"
]
}

View File

@ -3816,3 +3816,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:53:44` **INFO** Committed feature dropdown-menu-component
- `09:53:44` **INFO** Pushed: rc=0
## Phase-3 Feature: checkbox-component (2026-05-23 09:53:44)
- `09:53:44` **INFO** Description: Checkbox mit Label
- `09:53:44` **INFO** Generating apps/web/src/components/Checkbox.tsx (Checkbox-Component. Props: checked, onChange, label?, disabled?. Nativ…)
- `09:53:53` **INFO** wrote 989 chars in 9.0s (attempt 1)
- `09:53:53` **INFO** Running tsc --noEmit on api…
- `09:53:55` **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,40 @@
import React from 'react';
interface CheckboxProps {
checked: boolean;
onChange: (checked: boolean) => void;
label?: string;
disabled?: boolean;
id?: string;
}
export default function Checkbox({
checked,
onChange,
label,
disabled = false,
id
}: CheckboxProps) {
const checkboxId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
return (
<div className="flex items-center gap-2">
<input
type="checkbox"
id={checkboxId}
checked={checked}
disabled={disabled}
onChange={(e) => onChange(e.target.checked)}
className="h-4 w-4 rounded border-gray-300 text-blue-600 focus:ring-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer"
/>
{label && (
<label
htmlFor={checkboxId}
className="text-sm font-medium text-gray-700 cursor-pointer select-none"
>
{label}
</label>
)}
</div>
);
}