Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>Password Generator</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
21 changes: 4 additions & 17 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,11 @@
import logo from './logo.svg';
import './App.css';
import PasswordForm from './components/PasswordForm';

function App() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
</div>
<main className="App">
<PasswordForm />
</main>
);
}

Expand Down
58 changes: 58 additions & 0 deletions src/components/PasswordForm.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import React from 'react';

function PasswordForm() {
return(
<section>
<form>
<h2>Password Generator</h2>
<div>
<h3>Generate</h3>
<div>
<label htmlFor="password-length">Password lenght</label>
<input
id="password-length"
type="number"
max={32}
min={4}
/>
</div>

<div>
<label htmlFor="number">Includes Numbers</label>
<input
type="checkbox"
id="numbers"
/>
</div>

<div>
<label htmlFor="symbols">Include Symbols</label>
<input
type="checkbox"
id="symbols"
/>
</div>

<div>
<label htmlFor="uppercase">Include Uppercase</label>
<input
type="checkbox"
id="uppercase"
/>
</div>

<div>
<label htmlFor="lowercase">Include Lowercase</label>
<input
type="checkbox"
id="lowercase"
/>
</div>
<button type="button">Generate</button>
</div>
</form>
</section>
);
}

export default PasswordForm;