Files
nanobot/webui/src/components/ui/input.tsx
T

26 lines
817 B
TypeScript
Raw Normal View History

import * as React from "react";
2026-08-11 00:00:22 +08:00
import { formControlFocusClassName } from "@/components/ui/form-control";
import { cn } from "@/lib/utils";
2026-08-21 23:37:06 +08:00
type InputProps = React.InputHTMLAttributes<HTMLInputElement>;
const Input = React.forwardRef<HTMLInputElement, InputProps>(
({ className, type, ...props }, ref) => {
return (
<input
type={type}
className={cn(
"touch-text-input flex h-10 w-full rounded-full border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
2026-08-11 00:00:22 +08:00
formControlFocusClassName,
className,
)}
ref={ref}
{...props}
/>
);
},
);
Input.displayName = "Input";
export { Input };