import { ClassValue } from 'clsx'
import { cn } from '@/lib/utils'
type Props = { className?: ClassValue value: string setValue: React.Dispatch<React.SetStateAction<string>> placeholder: string}
export default function Input({ className, value, setValue, placeholder,}: Props) { return ( <input className={cn( 'rounded-base bg-white dark:bg-darkBg border-2 border-border dark:border-darkBorder p-[10px] font-base ring-offset-white dark:ring-offset-black focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-black dark:focus-visible:ring-white focus-visible:ring-offset-2 outline-none', className, )} type="text" name="text" placeholder={placeholder} value={value} onChange={(e) => { setValue(e.target.value) }} aria-label={placeholder} /> )}
import { useState } from 'react'
import Input from '@/components/Input'
const [username, setUsername] = useState('')
<Input value={username} setValue={setUsername} placeholder="Username" />
xd