import React, { useState } from 'react' import { Button, Input, Checkbox, Form } from 'antd' import { Typography, Col, Row } from 'antd' import { LockOutlined, UserOutlined } from '@ant-design/icons' import { validation } from '../../helpers' const { Title } = Typography const InitialForm = ({ onLogin, children }) => { const [login, setLogin] = useState('') const [password, setPassword] = useState('') const [checked, setChecked] = useState(false) const input = () => { onLogin(login, password) && setPassword('') && setLogin('') } return ( <>
{children} } placeholder="Login" value={login} size="medium" onChange={(e) => setLogin(e.target.value)} />

* Login must be at least 5 characters

} placeholder="Password" size="medium" type={checked ? 'text' : 'password'} value={password} onChange={(e) => setPassword(e.target.value)} />

* Use a combination of 8 or more letters, numbers, and symbols

{ setChecked(e.target.checked) }} size="medium" > See the password
) } export default InitialForm