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