damus.io

damus.io website
git clone git://jb55.com/damus.io
Log | Files | Refs | README | LICENSE

Input.tsx (818B)


      1 import * as React from "react"
      2 
      3 import { cn } from "@/lib/utils"
      4 
      5 export interface InputProps
      6   extends React.InputHTMLAttributes<HTMLInputElement> { }
      7 
      8 const Input = React.forwardRef<HTMLInputElement, InputProps>(
      9   ({ className, type, ...props }, ref) => {
     10     return (
     11       <input
     12         type={type}
     13         className={cn(
     14           "flex h-9 w-full rounded-md border border-white/30 bg-transparent text-white px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-white/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-damuspink-500 disabled:cursor-not-allowed disabled:opacity-50",
     15           className
     16         )}
     17         ref={ref}
     18         {...props}
     19       />
     20     )
     21   }
     22 )
     23 Input.displayName = "Input"
     24 
     25 export { Input }
     26