Spaces:
Build error
Build error
Mehdi commited on
Upload components/ui/input.tsx with huggingface_hub
Browse files- components/ui/input.tsx +24 -0
components/ui/input.tsx
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import * as React from "react";
|
| 2 |
+
import { cn } from "@/lib/utils";
|
| 3 |
+
|
| 4 |
+
export interface InputProps
|
| 5 |
+
extends React.InputHTMLAttributes<HTMLInputElement> {}
|
| 6 |
+
|
| 7 |
+
const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
| 8 |
+
({ className, type, ...props }, ref) => {
|
| 9 |
+
return (
|
| 10 |
+
<input
|
| 11 |
+
type={type}
|
| 12 |
+
className={cn(
|
| 13 |
+
"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
| 14 |
+
className
|
| 15 |
+
)}
|
| 16 |
+
ref={ref}
|
| 17 |
+
{...props}
|
| 18 |
+
/>
|
| 19 |
+
);
|
| 20 |
+
}
|
| 21 |
+
);
|
| 22 |
+
Input.displayName = "Input";
|
| 23 |
+
|
| 24 |
+
export { Input };
|