Skip to content

Commit a719115

Browse files
Video 9 Completed
1 parent 9df3e24 commit a719115

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/components/Navbar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ export default function Navbar(props) {
1818
<a className="nav-link" href="/">{props.aboutText}</a>
1919
</li>
2020
</ul>
21-
<form className="d-flex">
21+
{/* <form className="d-flex">
2222
<input className="form-control me-2" type="search" placeholder="Search" aria-label="Search" />
2323
<button className="btn btn-primary" type="submit">Search</button>
24-
</form>
24+
</form> */}
2525
</div>
2626
</div>
2727
</nav>

src/components/TextForm.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,17 @@ export default function TextForm(props) {
77
let newText = text.toUpperCase();
88
setText(newText)
99
}
10-
const handleLoClick = ()=>{
11-
// console.log("Uppercase was clicked: " + text);
10+
11+
const handleLoClick = ()=>{
1212
let newText = text.toLowerCase();
1313
setText(newText)
1414
}
1515

16+
const handleClearClick = ()=>{
17+
let newText = '';
18+
setText(newText)
19+
}
20+
1621
const handleOnChange = (event)=>{
1722
// console.log("On change");
1823
setText(event.target.value)
@@ -30,6 +35,7 @@ export default function TextForm(props) {
3035
</div>
3136
<button className="btn btn-primary mx-1" onClick={handleUpClick}>Convert to Uppercase</button>
3237
<button className="btn btn-primary mx-1" onClick={handleLoClick}>Convert to Lowercase</button>
38+
<button className="btn btn-primary mx-1" onClick={handleClearClick}>Clear Text</button>
3339
</div>
3440
<div className="container my-3">
3541
<h2>Your text summary</h2>

0 commit comments

Comments
 (0)