import * as React from "react" import { cn } from "~/utils" import { EyeOpenIcon, EyeNoneIcon } from "@radix-ui/react-icons" export interface InputProps extends React.InputHTMLAttributes { fullWidth?: boolean, leftIcon?: React.ReactNode } const Input = React.forwardRef( ({ className, type, fullWidth, leftIcon, ...props }, ref) => { const [showPassword, setShowPassword] = React.useState(false) const [mask, setMask] = React.useState(false) const toggleShowPassword = () => { setShowPassword((show) => !show) setMask((mask) => !mask) } return (
{leftIcon && (
{leftIcon}
)} {type === "password" ? : null}
) } ) Input.displayName = "Input" export { Input }