jbilcke-hf's picture
jbilcke-hf HF staff
initial commit
660842c
raw
history blame contribute delete
712 Bytes
import { ComponentProps } from "react";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { cn } from "@/lib/utils";
export function InputField({
label,
className = "",
labelClassName = "",
inputClassName = "",
...props
}: ComponentProps<typeof Input> & {
label?: string;
className?: string;
labelClassName?: string;
inputClassName?: string;
}) {
return (
<div className={cn(
`flex flex-row space-x-2 items-center`,
className
)}>
{label && <Label className={cn("text-xs text-zinc-400 w-1/3", labelClassName)}>{label}</Label>}
<Input {...props} className={cn("text-xs", inputClassName)} />
</div>
)
}