feat(form-group-component): FormGroup wrapper für Label/Input/Error [tsc:fail]
This commit is contained in:
parent
3e7a7a893f
commit
c108616747
@ -1,8 +1,9 @@
|
|||||||
{
|
{
|
||||||
"completed_features": [],
|
"completed_features": [],
|
||||||
"current_feature": "logo-component",
|
"current_feature": "form-group-component",
|
||||||
"started_at": "2026-05-23T10:18:26.780535",
|
"started_at": "2026-05-23T10:18:26.780535",
|
||||||
"attempted_features": [
|
"attempted_features": [
|
||||||
"sidebar-component"
|
"sidebar-component",
|
||||||
|
"logo-component"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -4229,3 +4229,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:19:10` **INFO** Committed feature logo-component
|
||||||
|
- `10:19:11` **INFO** Pushed: rc=0
|
||||||
|
|
||||||
|
## Phase-3 Feature: form-group-component (2026-05-23 10:19:11)
|
||||||
|
|
||||||
|
- `10:19:11` **INFO** Description: FormGroup wrapper für Label/Input/Error
|
||||||
|
- `10:19:11` **INFO** Generating apps/web/src/components/FormGroup.tsx (FormGroup-Component. Props: label, htmlFor?, error?, helpText?, requir…)
|
||||||
|
- `10:19:20` **INFO** wrote 938 chars in 9.0s (attempt 1)
|
||||||
|
- `10:19:20` **INFO** Running tsc --noEmit on api…
|
||||||
|
- `10:19:22` **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>,
|
||||||
|
|||||||
43
apps/web/src/components/FormGroup.tsx
Normal file
43
apps/web/src/components/FormGroup.tsx
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
import React, { ReactNode } from 'react';
|
||||||
|
|
||||||
|
interface FormGroupProps {
|
||||||
|
label: string;
|
||||||
|
htmlFor?: string;
|
||||||
|
error?: string;
|
||||||
|
helpText?: string;
|
||||||
|
required?: boolean;
|
||||||
|
children: ReactNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function FormGroup({
|
||||||
|
label,
|
||||||
|
htmlFor,
|
||||||
|
error,
|
||||||
|
helpText,
|
||||||
|
required,
|
||||||
|
children,
|
||||||
|
}: FormGroupProps) {
|
||||||
|
return (
|
||||||
|
<div className="flex flex-col gap-1.5 w-full">
|
||||||
|
{htmlFor && (
|
||||||
|
<label
|
||||||
|
htmlFor={htmlFor}
|
||||||
|
className="text-sm font-medium text-slate-700 dark:text-slate-300"
|
||||||
|
>
|
||||||
|
{label}
|
||||||
|
{required && <span className="text-red-500 ml-1">*</span>}
|
||||||
|
</label>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<div className="relative">
|
||||||
|
{children}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{error ? (
|
||||||
|
<p className="text-xs text-red-500 font-medium">{error}</p>
|
||||||
|
) : helpText ? (
|
||||||
|
<p className="text-xs text-slate-500 dark:text-slate-400">{helpText}</p>
|
||||||
|
) : null}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user