input.tsx 742 B

1234567891011121314151617181920
  1. import * as React from "react";
  2. import { cn } from "@/lib/utils";
  3. const Input = React.forwardRef<
  4. HTMLInputElement,
  5. React.InputHTMLAttributes<HTMLInputElement>
  6. >(({ className, type, ...props }, ref) => (
  7. <input
  8. type={type}
  9. className={cn(
  10. "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",
  11. className,
  12. )}
  13. ref={ref}
  14. {...props}
  15. />
  16. ));
  17. Input.displayName = "Input";
  18. export { Input };