import React from 'react'; import { useDisclosure } from '../../hooks'; import { Button } from '../button'; import { HelperText } from '../helper-text'; import EyeOffIcon from '../icons/eye-off-icon'; import EyeOpenIcon from '../icons/eye-open-icon'; import { Input, type InputProps } from '../input'; import { Label } from '../label'; export interface PasswordFieldProps extends InputProps { label?: string; helperText?: string; } const PasswordField = React.forwardRef( ({ label, helperText, variant = 'default', ...props }, ref) => { const [show, { toggle }] = useDisclosure(false); return (
{label && } {show ? : } } /> {helperText && {helperText}}
); } ); PasswordField.displayName = 'PasswordField'; export { PasswordField };