Skip to content

Commit

Permalink
Addition of Hide /Show Functionality in the Sign-up page done . (#218)
Browse files Browse the repository at this point in the history
  • Loading branch information
agrwal697 authored Jun 11, 2024
1 parent 6a70667 commit 8d18202
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions src/pages/signup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import Link from '@docusaurus/Link';
import React, { useState } from 'react';

<link rel="stylesheet" type="text/css" href="/css/custom.css"></link>



function App() {
const [passwordShown, setPasswordShown] = useState(false);

const togglePasswordVisibility = () => {
setPasswordShown(!passwordShown);
};

return (

<div className="form-container">
<h2>SignUp</h2>
<form>
<div className="input-container">
<label htmlFor="Username">Username:</label>
<input type="text" id="username" name="username" required />
</div>
<div className="input-container">
<label htmlFor="email">Email:</label>
<input type="text" id="username" name="username" required />
</div>
<div className="input-container">
<label htmlFor="password">Password:</label>
<input
type={passwordShown ? 'text' : 'password'}
id="password"
name="password"
required
></input>
<span><btn className="toggle-password" onClick={togglePasswordVisibility}>
{passwordShown ? 'Hide' : 'Show'}
</btn>
</span>
</div>
&nbsp;
<div className="input-container">
<button type="submit">SignUp</button>
<p>Don't have an account yet? <Link to ="Login"> Login</Link></p>
</div>
</form>
</div>
);
}

export default App;

0 comments on commit 8d18202

Please sign in to comment.