add components register and login
This commit is contained in:
parent
d7734cb68a
commit
9a3f05ef60
7 changed files with 303 additions and 2 deletions
39
SurveyFrontend/src/components/LoginForm/LoginForm.tsx
Normal file
39
SurveyFrontend/src/components/LoginForm/LoginForm.tsx
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
import { Link } from "react-router-dom";
|
||||
import styles from './LoginForm.module.css';
|
||||
import { useState } from 'react';
|
||||
|
||||
const RegisterForm = () => {
|
||||
const [focused, setFocused] = useState({
|
||||
email: false,
|
||||
password: false
|
||||
});
|
||||
return (
|
||||
<div className={styles.loginContainer}>
|
||||
<h2 className={styles.title}>С возвращением!</h2>
|
||||
<form className={styles.form}>
|
||||
<input
|
||||
className={`${styles.input} ${styles.email}`}
|
||||
type={'email'}
|
||||
placeholder='Почта'
|
||||
onFocus={() => setFocused({ ...focused, email: true })}
|
||||
onBlur={() => setFocused({ ...focused, email: false })}
|
||||
style={{ color: focused.email ? 'black' : 'inherit' }}
|
||||
/>
|
||||
<input
|
||||
className={`${styles.input} ${styles.password}`}
|
||||
type='password'
|
||||
placeholder='Пароль'
|
||||
onFocus={() => setFocused({ ...focused, password: true })}
|
||||
onBlur={() => setFocused({ ...focused, password: false })}
|
||||
style={{ color: focused.password ? 'black' : 'inherit' }}
|
||||
/>
|
||||
<button className={styles.signIn}>Войти</button>
|
||||
</form>
|
||||
<p className={styles.recommendation}>Еще не с нами?
|
||||
<Link className={styles.recommendationLink} to='/register'>Зарегистрируйтесь!</Link>
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default RegisterForm;
|
||||
Loading…
Add table
Add a link
Reference in a new issue