Skip to content

Commit 2cd91c3

Browse files
authored
Merge pull request #67 from s0ham075/master
Signup Page
2 parents ba78ca7 + d6c284b commit 2cd91c3

File tree

4 files changed

+49
-14
lines changed

4 files changed

+49
-14
lines changed

src/LoginM.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import React from 'react'
22
import { Login } from './main-page/Login'
3-
43
export default function LoginM() {
54
return (
65
<div>
7-
8-
<Login/>
6+
<Login/>
97
</div>
108
)
119
}

src/main-page/Login.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,22 @@ export const Login = () => {
1616
}
1717
return (
1818
<>
19-
<div className="containerr">
19+
<div className="container">
2020

21-
2221
<form action="" onSubmit={submitform} className="form">
2322
<div>
2423
<label htmlFor="email">Email </label>
2524
<input type="text" name="email" id="email" autoComplete='off' value={email}
2625
onChange={(e)=>setEmail(e.target.value)}
2726
/>
28-
27+
2928
</div>
3029
<div>
3130
<label htmlFor="password">password </label>
3231
<input type="text" name="password" id="password" autoComplete='off' value={password}
3332
onChange={(e)=>setPassword(e.target.value)}
3433
/>
35-
34+
3635
</div>
3736
<button type='submit'>Login</button>
3837

src/main-page/Signup.js

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import React from 'react'
2+
import { useState } from 'react';
3+
import "./login.css"
4+
5+
export const Signup = () => {
6+
const [username, setUsername] = useState("");
7+
const [email,setEmail]=useState("");
8+
const [password,setPassword]=useState("");
9+
10+
11+
const submitform=()=>{
12+
// handle submit logic here
13+
}
14+
15+
return (
16+
<>
17+
<div className="container">
18+
<form action="" onSubmit={submitform} className="form">
19+
<div>
20+
<label htmlFor="email">Username</label>
21+
<input type="text" name="username" id="username" autoComplete='off' value={username}
22+
onChange={(e)=>setUsername(e.target.value)}/>
23+
</div>
24+
<div>
25+
<label htmlFor="email">Email </label>
26+
<input type="text" name="email" id="email" autoComplete='off' value={email}
27+
onChange={(e)=>setEmail(e.target.value)}/>
28+
</div>
29+
<div>
30+
<label htmlFor="password">password </label>
31+
<input type="text" name="password" id="password" autoComplete='off' value={password}
32+
onChange={(e)=>setPassword(e.target.value)}/>
33+
</div>
34+
<button type='submit'>Login</button>
35+
</form>
36+
</div>
37+
</>
38+
)
39+
}

src/main-page/login.css

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,31 @@
1-
.containerr{
1+
.container{
22
display:flex;
33
justify-content: center;
4-
54
}
65

76
.form{
87
background-color: white;
9-
height: 60vh;
8+
height: fit-content;
109
width:34vw;
1110
display:flex;
1211
flex-direction: column;
1312
align-items: center;
14-
padding: 4rem;
13+
padding: 1rem 4rem;
1514
border-radius: 1rem;
16-
15+
margin-left: 15vw;
1716
}
1817

1918
.form input{
2019
color:blue;
2120
margin: 2rem 2rem;
2221
border-radius: 1rem;
2322
border: 2px solid aquamarine;
24-
padding: 10px;
23+
padding: 5px 10px;
2524
}
2625
.form button{
2726
width:10vw;
2827
padding: 0.8rem;
29-
margin: 1rem;
28+
margin: 0.5rem 1rem;
3029
border-radius: 1rem;
3130
color:blue;
3231
border: 2px solid aquamarine;

0 commit comments

Comments
 (0)