feat(hint-component): Hint mit Info-Icon [tsc:fail]
This commit is contained in:
parent
1679fdfb51
commit
96753c8f4c
@ -1,5 +1,8 @@
|
||||
{
|
||||
"completed_features": [],
|
||||
"current_feature": "footer-component",
|
||||
"started_at": "2026-05-23T10:43:31.771649"
|
||||
"current_feature": "hint-component",
|
||||
"started_at": "2026-05-23T10:43:31.771649",
|
||||
"attempted_features": [
|
||||
"footer-component"
|
||||
]
|
||||
}
|
||||
@ -4606,3 +4606,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>,
|
||||
- `10:43:41` **INFO** Committed feature footer-component
|
||||
- `10:43:42` **INFO** Pushed: rc=0
|
||||
|
||||
## Phase-3 Feature: hint-component (2026-05-23 10:43:42)
|
||||
|
||||
- `10:43:42` **INFO** Description: Hint mit Info-Icon
|
||||
- `10:43:42` **INFO** Generating apps/web/src/components/Hint.tsx (Hint-Component. Props: children, variant?: 'tip'|'warning'|'note'. Kle…)
|
||||
- `10:43:50` **INFO** wrote 1002 chars in 8.5s (attempt 1)
|
||||
- `10:43:50` **INFO** Running tsc --noEmit on api…
|
||||
- `10:43:52` **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>,
|
||||
|
||||
37
apps/web/src/components/Hint.tsx
Normal file
37
apps/web/src/components/Hint.tsx
Normal file
@ -0,0 +1,37 @@
|
||||
import React from 'react';
|
||||
import { Info, Lightbulb, AlertCircle } from 'lucide-react';
|
||||
|
||||
interface HintProps {
|
||||
children: React.ReactNode;
|
||||
variant?: 'tip' | 'warning' | 'note';
|
||||
}
|
||||
|
||||
const variantStyles = {
|
||||
tip: {
|
||||
container: 'bg-blue-50 text-blue-800 border-blue-200',
|
||||
icon: <Lightbulb className="w-4 h-4 text-blue-600" />,
|
||||
},
|
||||
warning: {
|
||||
container: 'bg-yellow-50 text-yellow-800 border-yellow-200',
|
||||
icon: <AlertCircle className="w-4 h-4 text-yellow-600" />,
|
||||
},
|
||||
note: {
|
||||
container: 'bg-zinc-50 text-zinc-800 border-zinc-200',
|
||||
icon: <Info className="w-4 h-4 text-zinc-600" />,
|
||||
},
|
||||
};
|
||||
|
||||
export default function Hint({ children, variant = 'note' }: HintProps) {
|
||||
const style = variantStyles[variant];
|
||||
|
||||
return (
|
||||
<div className={`flex items-start gap-3 p-3 rounded-md border text-sm ${style.container}`}>
|
||||
<div className="mt-0.5 shrink-0">
|
||||
{style.icon}
|
||||
</div>
|
||||
<div className="leading-relaxed">
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user