lamassu-server/new-lamassu-admin/src/components/inputs/formik/SecretInput.jsx
Rafael d3c3de66fe chore: prettier config
husky needs to be delegated to v11 since it breaks with node 14 + 22
combo
2024-12-03 09:33:06 +00:00

24 lines
556 B
JavaScript

import React, { memo } from 'react'
import { SecretInput } from '../base'
const SecretInputFormik = memo(({ isPasswordFilled, ...props }) => {
const { name, onChange, onBlur, value } = props.field
const { touched, errors } = props.form
const error = !isPasswordFilled && !!(touched[name] && errors[name])
return (
<SecretInput
name={name}
isPasswordFilled={isPasswordFilled}
onChange={onChange}
onBlur={onBlur}
value={value}
error={error}
{...props}
/>
)
})
export default SecretInputFormik