1+ import React , { useState } from 'react'
2+ import { BsMortarboardFill } from "react-icons/bs" ;
3+ import { Link } from 'react-router-dom' ;
4+
5+ const SignIn = ( ) => {
6+ // for login data
7+ const [ LoginData , SetLoginData ] = useState ( {
8+ email : '' ,
9+ password : ''
10+ } )
11+
12+ // send data to backend using axios
13+ const headleSubmit = ( e ) => {
14+ e . preventDefault ( ) ;
15+
16+ // login to system
17+ // this will be updated in future versions
18+ }
19+ return (
20+ < div className = 'bg-gray-200 min-h-screen py-24 px-8' >
21+ < div className = "md:grid grid-cols-3 gap-2" >
22+ < div className = "" > </ div >
23+ < div className = "" >
24+ < div className = "bg-white py-16 px-8 rounded shadow-md w-full " >
25+ < center className = 'text-gray-500' >
26+ { /* change the Icon According to your needs */ }
27+ < h1 className = '' > < BsMortarboardFill className = 'h-20 w-auto' /> </ h1 >
28+ < p className = "pt-4 text-2xl" > Welcome Back</ p >
29+ < p className = "" > Your Project Name</ p >
30+ </ center >
31+ < hr className = 'my-2' />
32+ < div className = "my-4" >
33+ < form onSubmit = { headleSubmit } >
34+ < div className = "my-2 md:mx-8" >
35+ < label htmlFor = "" className = '' > Email : </ label >
36+ < input type = "email" name = "" id = "" className = "w-full h-12 pl-2 rounded bg-gray-200" required placeholder = 'Enter Email Address'
37+ onChange = { e => SetLoginData ( { ...LoginData , email :e . target . value } ) } />
38+ </ div >
39+ < div className = "my-2 md:mx-8" >
40+ < label htmlFor = "" className = '' > Password : </ label >
41+ < input type = "password" name = "" id = "" className = "w-full h-12 pl-2 rounded bg-gray-200" required placeholder = 'Enter Password'
42+ onChange = { e => SetLoginData ( { ...LoginData , password :e . target . value } ) } />
43+ </ div >
44+ < div className = "my-2 md:mx-8" >
45+ < button type = 'submit' className = 'mt-8 font-semibold w-full py-4 px-8 rounded bg-blue-500 text-white shadow-md duration-500 hover:bg-blue-600' > SignIn</ button >
46+ </ div >
47+ </ form >
48+ < Link > < p className = "my-2 md:mx-8 text-blue-500 font-semibold" > Forget Password ? </ p > </ Link >
49+ </ div >
50+ < hr className = 'my-2' />
51+ < p className = "my-4" > Don't have an Account ? < Link to = { '/SignUp' } > < span className = "text-blue-500" > SignUp</ span > </ Link > </ p >
52+ </ div >
53+ </ div >
54+ < div className = "" > </ div >
55+ </ div >
56+ </ div >
57+ )
58+ }
59+
60+ export default SignIn
0 commit comments