2025-08-04 17:45:44 +02:00
|
|
|
import { forwardRef, type InputHTMLAttributes } from "react";
|
|
|
|
|
import { cn } from "src/lib/utils";
|
|
|
|
|
|
|
|
|
|
type InputProps = InputHTMLAttributes<HTMLInputElement>;
|
|
|
|
|
|
|
|
|
|
const Input = forwardRef<HTMLInputElement, InputProps>(
|
2025-08-28 18:27:07 +02:00
|
|
|
({ className, type, ...props }, ref) => {
|
|
|
|
|
return (
|
|
|
|
|
<input
|
|
|
|
|
ref={ref}
|
2025-08-29 16:18:32 +02:00
|
|
|
type={type}
|
2025-08-28 18:27:07 +02:00
|
|
|
{...props}
|
|
|
|
|
className={cn(
|
|
|
|
|
`border-border bg-background text-primary placeholder:text-muted-foreground hover:border-muted-foreground focus:border-foreground focus:ring-foreground w-full rounded-lg border px-3 py-2 font-medium shadow-xs outline-hidden transition-all duration-200 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:cursor-not-allowed disabled:opacity-50`,
|
|
|
|
|
className,
|
|
|
|
|
)}
|
|
|
|
|
/>
|
|
|
|
|
);
|
|
|
|
|
},
|
2025-08-04 17:45:44 +02:00
|
|
|
);
|
|
|
|
|
Input.displayName = "Input";
|
|
|
|
|
|
|
|
|
|
export default Input;
|