"use client" import * as React from "react" import { cn } from "../../utils/cn" import { EyeIcon } from "../icons-v2-generated/interface/eye-icon" import { EyeOffIcon } from "../icons-v2-generated/interface/eye-off-icon" import { Input, type InputProps } from "./input" export type PasswordInputProps = Omit /** Password field with a show/hide toggle (eye icon), built on the base Input. */ const PasswordInput = React.forwardRef(({ disabled, className, ...props }, ref) => { const [visible, setVisible] = React.useState(false) const Icon = visible ? EyeOffIcon : EyeIcon return ( setVisible((value) => !value)} className="flex items-center text-ods-text-secondary transition-colors hover:text-ods-text-primary disabled:cursor-not-allowed" > } {...props} /> ) }) PasswordInput.displayName = "PasswordInput" export { PasswordInput }