- Move all frontend code to frontend/ directory - Add backend/ with Go project structure (cmd, internal, pkg) - Add docker-compose.yml for orchestration
26 lines
799 B
TypeScript
26 lines
799 B
TypeScript
import type { InputHTMLAttributes } from 'react';
|
|
|
|
interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
label?: string;
|
|
error?: string;
|
|
}
|
|
|
|
export const Input = ({ label, error, className = '', ...props }: InputProps) => {
|
|
return (
|
|
<div className="w-full">
|
|
{label && (
|
|
<label className="block text-sm font-medium text-[#1b1b1d] mb-1">
|
|
{label}
|
|
</label>
|
|
)}
|
|
<input
|
|
className={`w-full px-3 py-2 bg-[#f5f3f5] border border-[#c5c6cd] rounded-md text-[#1b1b1d] placeholder-[#75777d] focus:outline-none focus:ring-2 focus:ring-[#1B263B] focus:border-transparent transition-colors ${className}`}
|
|
{...props}
|
|
/>
|
|
{error && (
|
|
<p className="mt-1 text-sm text-red-600">{error}</p>
|
|
)}
|
|
</div>
|
|
);
|
|
};
|