import { InputItem, Label, AlertText, TextInput } from '../../styles/Components';

const AccountEditItem = ({ title, name, placeholder, value, onChange, register, errors }) => {
	return (
		<InputItem>
			<Label require="true">{title}</Label>
			<TextInput fontSize="15px" $padding="16px 20px" type="password" name={name} placeholder={placeholder} required onChange={onChange} {...register(name)} />
			<AlertText>{errors[`${name}`] && errors[`${name}`].message}</AlertText>
		</InputItem>
	);
};

export default AccountEditItem;
