flockstr/components/ui/input.tsx

26 lines
828 B
TypeScript
Raw Normal View History

2023-10-24 13:37:15 -04:00
import * as React from "react";
2023-10-13 09:23:11 -04:00
2023-10-24 13:37:15 -04:00
import { cn } from "@/lib/utils";
2023-10-13 09:23:11 -04:00
export interface InputProps
extends React.InputHTMLAttributes<HTMLInputElement> {}
const Input = React.forwardRef<HTMLInputElement, InputProps>(
({ className, type, ...props }, ref) => {
return (
<input
type={type}
className={cn(
2023-10-24 16:21:27 -04:00
"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 max-sm:text-[16px]",
2023-10-24 13:37:15 -04:00
className,
2023-10-13 09:23:11 -04:00
)}
ref={ref}
{...props}
/>
2023-10-24 13:37:15 -04:00
);
},
);
Input.displayName = "Input";
2023-10-13 09:23:11 -04:00
2023-10-24 13:37:15 -04:00
export { Input };