mirror of
https://github.com/arthur-pbty/flint.git
synced 2026-08-03 12:48:00 +02:00
22 lines
724 B
TypeScript
22 lines
724 B
TypeScript
import { forwardRef, type InputHTMLAttributes } from "react";
|
|
|
|
import { cn } from "./cn";
|
|
|
|
export type InputProps = InputHTMLAttributes<HTMLInputElement>;
|
|
|
|
export const Input = forwardRef<HTMLInputElement, InputProps>(function Input(
|
|
{ className, ...props },
|
|
ref,
|
|
) {
|
|
return (
|
|
<input
|
|
className={cn(
|
|
"h-11 w-full rounded-xl border border-[var(--border-subtle)] bg-[var(--surface-subtle)] px-3 text-sm text-[var(--foreground)] placeholder:text-[var(--foreground-muted)]/75 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--primary)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--bg)]",
|
|
className,
|
|
)}
|
|
ref={ref}
|
|
{...props}
|
|
/>
|
|
);
|
|
});
|