- Replace Vite + React Router with Next.js 15 App Router - Implement i18n with next-intl (URL-based: /de, /en, /sr) - Add SSR/SSG for all pages (48 static pages generated) - Setup Supabase SSR client for auth - Migrate all pages: Home, About, Portfolio, Blog, Contact, Login, Dashboard, Imprint, Privacy, Terms - Add Docker support with standalone output - Replace i18next with next-intl JSON translations - Use next/image for optimized images Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
29 lines
1013 B
TypeScript
29 lines
1013 B
TypeScript
import React from 'react';
|
|
|
|
interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
error?: string;
|
|
}
|
|
|
|
export const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
|
|
({ className = '', error, ...props }, ref) => {
|
|
return (
|
|
<div className="w-full">
|
|
<textarea
|
|
className={`w-full bg-zinc-900/50 border border-white/10 rounded-lg px-4 py-3
|
|
text-white placeholder-white/40 focus:outline-none focus:ring-2
|
|
focus:ring-primary transition-all resize-none
|
|
disabled:opacity-50 disabled:cursor-not-allowed
|
|
${error ? 'border-red-500' : ''}
|
|
${className}`}
|
|
ref={ref}
|
|
{...props}
|
|
/>
|
|
{error && <p className="mt-2 text-sm text-red-400">{error}</p>}
|
|
</div>
|
|
);
|
|
}
|
|
);
|
|
|
|
Textarea.displayName = 'Textarea';
|
|
|
|
export default Textarea; |