input.tsx
1import * as React from "react"
2
3import { cn } from "@/lib/utils"
4
5export interface InputProps
6 extends React.InputHTMLAttributes<HTMLInputElement> {}
7
8const Input = React.forwardRef<HTMLInputElement, InputProps>(
9 ({ className, type, ...props }, ref) => {
10 return (
11 <input
12 type={type}
13 className={cn(
14 "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
15 className
16 )}
17 ref={ref}
18 {...props}
19 />
20 )
21 }
22)
23Input.displayName = "Input"
24
25export { Input }
26