-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create the Login component and reuse the register component's scss in…
… login component
- Loading branch information
1 parent
0e9ab06
commit 4d8f342
Showing
7 changed files
with
70 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export interface ILogin{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
.login { | ||
min-height: 80vh; | ||
padding: 40px 20px; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
.form { | ||
border: 1px solid rgba($color: #000000, $alpha: 0.1); | ||
padding: 20px; | ||
} | ||
|
||
.formTitle { | ||
font-family: "Cabin", sans-serif; | ||
margin-bottom: 10px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const login: string; | ||
export const form: string; | ||
export const formTitle: string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React, { useState } from "react"; | ||
import styles from "app/components/Register/Register.module.scss"; | ||
import InputLabelGroup from "../InputLabelGroup/InputLabelGroup"; | ||
import { Formik, Form } from "formik"; | ||
import PrimaryButton from "app/components/Buttons/PrimaryButton/PrimaryButton"; | ||
const Login = () => { | ||
const initialValues = { email: "", password: "" }; | ||
const [formData, setFormData] = useState(initialValues); | ||
|
||
return ( | ||
<Formik | ||
initialValues={initialValues} | ||
onSubmit={(values) => setFormData(values)} | ||
> | ||
<div className={styles.login}> | ||
<Form className={styles.form}> | ||
<h2 className={styles.formTitle}>Login</h2> | ||
<p className={styles.formDescription}> | ||
Please login to unleash the features of WooleSale that only true | ||
customers can have. | ||
</p> | ||
<InputLabelGroup name="email" label="Email" type="email" /> | ||
<InputLabelGroup name="password" label="Password" type="password" /> | ||
<PrimaryButton type="submit">Login</PrimaryButton> | ||
</Form> | ||
</div> | ||
</Formik> | ||
); | ||
}; | ||
export default Login; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4d8f342
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: