mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-06 04:20:59 +08:00
25 lines
637 B
TypeScript
25 lines
637 B
TypeScript
import * as React from 'react'
|
|
import { cn } from '../../lib/cn'
|
|
|
|
export type InputProps = React.InputHTMLAttributes<HTMLInputElement>
|
|
|
|
export const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
|
({ className, type = 'text', ...props }, ref) => {
|
|
return (
|
|
<input
|
|
ref={ref}
|
|
type={type}
|
|
className={cn(
|
|
'flex h-10 w-full rounded px-3 py-2 text-sm',
|
|
'bg-[var(--brand-black)] border border-[var(--panel-border)]',
|
|
'text-[var(--brand-light-gray)] focus:outline-none',
|
|
className
|
|
)}
|
|
{...props}
|
|
/>
|
|
)
|
|
}
|
|
)
|
|
|
|
Input.displayName = 'Input'
|