-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.jsx
More file actions
36 lines (34 loc) · 1.05 KB
/
App.jsx
File metadata and controls
36 lines (34 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { useState } from 'react';
import './App.css'
function App() {
const[isLogin,setIsLogin]= useState(true);
return (
<>
<div className='container'>
<div className='form-container'>
<div className='form-toggle'>
<button className={isLogin? 'active': ""} onClick={()=>setIsLogin(true)}>Login</button>
<button className={!isLogin? 'active': ""} onClick={()=>setIsLogin(false)}>SignUp</button>
</div>
{isLogin? <>
<div className='form'>
<h2>LOGIN FORM</h2>
<input type='email' placeholder='Email'/>
<input type='password' placeholder='Password'/>
<button>LOGIN</button>
<p>Not a member? <a onClick={()=>setIsLogin(false)}>Signup</a></p>
</div>
</> : <>
<div className='form'>
<h2>SIGNUP FORM</h2>
<input type='email' placeholder='Email'/>
<input type='password' placeholder='password'/>
<button>SignUp</button>
</div>
</>}
</div>
</div>
</>
);
}
export default App;