import clsx from "clsx"; import {useState} from "react"; interface Props { type: "email" | "text" | "password" | "tel" | "number"; roundness?: "full" | "xl"; required?: boolean; label?: string; placeholder?: string; defaultValue?: string | number; value?: string | number; className?: string; disabled?: boolean; name: string; onChange: (value: string) => void; } export default function Input({ type, label, placeholder, name, required = false, value, defaultValue, className, roundness = "full", disabled = false, onChange, }: Props) { const [showPassword, setShowPassword] = useState(false); if (type === "password") { return (
setShowPassword((prev) => !prev)} className="text-xs cursor-pointer absolute bottom-1/2 translate-y-1/2 right-8"> {showPassword ? "Hide" : "Show"}