import { useState } from 'react'; import Icon from './Icon'; type SecretFieldProps = { label: string; value: string; onChange: Function; placeholder?: string; classNames?: string; hasError?: boolean; } const SecretField = ({ label = '', value = '', placeholder = '', onChange, hasError = false }: SecretFieldProps) => { const [showValue, setShowValue] = useState(false); const labelStyle = 'mb-2 font-semibold inline-block text-sm text-gray-700 capitalize'; return (
setShowValue(!showValue)}> onChange(event.target.value)} autoComplete="off" placeholder={placeholder} />
); }; export default SecretField;