infoalloggi-monorepo/apps/infoalloggi/src/components/custom_ui/input.tsx

24 lines
898 B
TypeScript
Raw Normal View History

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(
`w-full rounded-lg border border-border bg-background px-3 py-2 font-medium text-primary shadow-xs outline-hidden transition-all duration-200 file:border-0 file:bg-transparent file:font-medium file:text-sm placeholder:text-muted-foreground hover:border-muted-foreground focus:border-foreground focus:ring-foreground disabled:cursor-not-allowed disabled:opacity-50 dark:border-input dark:bg-input/30 dark:hover:border-muted-foreground dark:hover:bg-input/50`,
2025-08-28 18:27:07 +02:00
className,
)}
/>
);
},
2025-08-04 17:45:44 +02:00
);
Input.displayName = "Input";
export default Input;