feat(radio-group-component): RadioGroup mit Optionen [tsc:fail]

This commit is contained in:
Dennis (via Claude+Gemma) 2026-05-23 09:54:27 +02:00
parent 6eb9428c2e
commit dea538987b
3 changed files with 79 additions and 2 deletions

View File

@ -1,9 +1,10 @@
{
"completed_features": [],
"current_feature": "switch-toggle-component",
"current_feature": "radio-group-component",
"started_at": "2026-05-23T09:53:25.616963",
"attempted_features": [
"dropdown-menu-component",
"checkbox-component"
"checkbox-component",
"switch-toggle-component"
]
}

View File

@ -3852,3 +3852,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:54:11` **INFO** Committed feature switch-toggle-component
- `09:54:11` **INFO** Pushed: rc=0
## Phase-3 Feature: radio-group-component (2026-05-23 09:54:11)
- `09:54:11` **INFO** Description: RadioGroup mit Optionen
- `09:54:11` **INFO** Generating apps/web/src/components/RadioGroup.tsx (RadioGroup-Component. Props: value, onChange, options (array {value, l…)
- `09:54:25` **INFO** wrote 1703 chars in 13.6s (attempt 1)
- `09:54:25` **INFO** Running tsc --noEmit on api…
- `09:54:27` **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,58 @@
import React from 'react';
interface RadioOption {
value: string;
label: string;
description?: string;
}
interface RadioGroupProps {
name: string;
value: string;
onChange: (value: string) => void;
options: RadioOption[];
}
const RadioGroup: React.FC<RadioGroupProps> = ({ name, value, onChange, options }) => {
return (
<div className="flex flex-col gap-3">
{options.map((option) => {
const isSelected = value === option.value;
return (
<label
key={option.value}
className={`
relative flex cursor-pointer rounded-lg border p-4 transition-all
${isSelected
? 'border-blue-500 ring-2 ring-blue-500 bg-blue-50/50'
: 'border-gray-200 hover:border-gray-300 bg-white'}
`}
>
<div className="flex items-center h-5">
<input
type="radio"
name={name}
value={option.value}
checked={isSelected}
onChange={(e) => onChange(e.target.value)}
className="h-4 w-4 border-gray-300 text-blue-600 focus:ring-blue-500"
/>
</div>
<div className="ml-3 flex flex-col">
<span className={`text-sm font-medium ${isSelected ? 'text-blue-900' : 'text-gray-900'}`}>
{option.label}
</span>
{option.description && (
<span className="text-xs text-gray-500">
{option.description}
</span>
)}
</div>
</label>
);
})}
</div>
);
};
export default RadioGroup;