31 lines
725 B
TypeScript
31 lines
725 B
TypeScript
"use client"
|
|
|
|
import * as React from "react"
|
|
import { cn } from "cn"
|
|
import {
|
|
composeRenderProps,
|
|
Input as InputPrimitive,
|
|
} from "react-aria-components"
|
|
|
|
function Input({
|
|
className,
|
|
type,
|
|
...props
|
|
}: React.ComponentProps<typeof InputPrimitive>) {
|
|
return (
|
|
<InputPrimitive
|
|
type={type}
|
|
data-slot="input"
|
|
className={composeRenderProps(className, (className) =>
|
|
cn(
|
|
"cn-input w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
className
|
|
)
|
|
)}
|
|
{...props}
|
|
/>
|
|
)
|
|
}
|
|
|
|
export { Input }
|