20 lines
589 B
TypeScript
20 lines
589 B
TypeScript
import * as React from "react";
|
|
import { cn } from "@/lib/utils";
|
|
|
|
export const Input = React.forwardRef<HTMLInputElement, React.InputHTMLAttributes<HTMLInputElement>>(
|
|
({ className, type = "text", ...props }, ref) => (
|
|
<input
|
|
ref={ref}
|
|
type={type}
|
|
className={cn(
|
|
"flex h-10 w-full rounded-md border border-slate-300 bg-white px-3 py-2 text-sm placeholder:text-slate-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 disabled:opacity-50",
|
|
className
|
|
)}
|
|
{...props}
|
|
/>
|
|
)
|
|
);
|
|
Input.displayName = "Input";
|
|
|
|
export default Input;
|