diff --git a/.phase36-state.json b/.phase36-state.json index ee4245d..0555515 100644 --- a/.phase36-state.json +++ b/.phase36-state.json @@ -1,5 +1,8 @@ { "completed_features": [], - "current_feature": "input-component", - "started_at": "2026-05-23T09:58:25.839766" + "current_feature": "textarea-component", + "started_at": "2026-05-23T09:58:25.839766", + "attempted_features": [ + "input-component" + ] } \ No newline at end of file diff --git a/GENERATION_LOG.md b/GENERATION_LOG.md index 58b914c..ce2b7d0 100644 --- a/GENERATION_LOG.md +++ b/GENERATION_LOG.md @@ -3895,3 +3895,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, +- `09:58:44` **INFO** Committed feature input-component +- `09:58:44` **INFO** Pushed: rc=0 + +## Phase-3 Feature: textarea-component (2026-05-23 09:58:44) + +- `09:58:44` **INFO** Description: Textarea mit auto-resize + char-count +- `09:58:44` **INFO** Generating apps/web/src/components/Textarea.tsx (Textarea-Component. Props: value, onChange, label?, error?, placeholde…) +- `09:59:01` **INFO** wrote 1912 chars in 16.6s (attempt 1) +- `09:59:01` **INFO** Running tsc --noEmit on api… +- `09:59:03` **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/Textarea.tsx b/apps/web/src/components/Textarea.tsx new file mode 100644 index 0000000..249a285 --- /dev/null +++ b/apps/web/src/components/Textarea.tsx @@ -0,0 +1,72 @@ +import React, { useEffect, useRef } from 'react'; + +interface TextareaProps extends React.TextareaHTMLAttributes { + label?: string; + error?: string; + autoResize?: boolean; +} + +const Textarea: React.FC = ({ + label, + error, + placeholder, + rows = 4, + maxLength, + autoResize = false, + value, + onChange, + className = '', + ...props +}) => { + const textareaRef = useRef(null); + + useEffect(() => { + if (autoResize && textareaRef.current) { + textareaRef.current.style.height = 'auto'; + textareaRef.current.style.height = `${textareaRef.current.scrollHeight}px`; + } + }, [value, autoResize]); + + return ( +
+ {label && ( + + )} + +
+