| 3 | import { cn } from "@/lib/utils" |
| 4 | |
| 5 | function Input({ className, type, ...props }: React.ComponentProps<"input">) { |
| 6 | return ( |
| 7 | <input |
| 8 | type={type} |
| 9 | data-slot="input" |
| 10 | className={cn( |
| 11 | "h-9 w-full min-w-0 rounded-md border border-[var(--color-border)] bg-[var(--color-bg)] px-3 py-2 text-sm text-[var(--color-text-strong)] transition-all duration-150", |
| 12 | "placeholder:text-[var(--color-text-weak)]", |
| 13 | "focus-visible:border-[var(--color-bg-strong)] focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-[var(--color-bg-interactive)]", |
| 14 | "dark:focus-visible:border-[var(--color-bg-interactive)] dark:focus-visible:ring-0", |
| 15 | "disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50", |
| 16 | "file:border-0 file:bg-transparent file:text-sm file:font-medium", |
| 17 | className |
| 18 | )} |
| 19 | {...props} |
| 20 | /> |
| 21 | ) |
| 22 | } |
| 23 | |
| 24 | export { Input } |