21 lines
670 B
TypeScript
21 lines
670 B
TypeScript
import { Input as InputPrimitive } from '@base-ui/react/input'
|
|
import type * as React from 'react'
|
|
|
|
import { cn } from '../../lib/utils'
|
|
|
|
function Input({ className, type, ...props }: React.ComponentProps<'input'>) {
|
|
return (
|
|
<InputPrimitive
|
|
type={type}
|
|
data-slot="input"
|
|
className={cn(
|
|
'h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-sm transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50',
|
|
className
|
|
)}
|
|
{...props}
|
|
/>
|
|
)
|
|
}
|
|
|
|
export { Input }
|