v2
424c17b ยท 1 year ago 26 commits
 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 file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none 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 }