File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -18,10 +18,10 @@ export default function Navbar(props) {
18
18
< a className = "nav-link" href = "/" > { props . aboutText } </ a >
19
19
</ li >
20
20
</ ul >
21
- < form className = "d-flex" >
21
+ { /* <form className="d-flex">
22
22
<input className="form-control me-2" type="search" placeholder="Search" aria-label="Search" />
23
23
<button className="btn btn-primary" type="submit">Search</button>
24
- </ form >
24
+ </form> */ }
25
25
</ div >
26
26
</ div >
27
27
</ nav >
Original file line number Diff line number Diff line change @@ -7,12 +7,17 @@ export default function TextForm(props) {
7
7
let newText = text . toUpperCase ( ) ;
8
8
setText ( newText )
9
9
}
10
- const handleLoClick = ( ) => {
11
- // console.log("Uppercase was clicked: " + text);
10
+
11
+ const handleLoClick = ( ) => {
12
12
let newText = text . toLowerCase ( ) ;
13
13
setText ( newText )
14
14
}
15
15
16
+ const handleClearClick = ( ) => {
17
+ let newText = '' ;
18
+ setText ( newText )
19
+ }
20
+
16
21
const handleOnChange = ( event ) => {
17
22
// console.log("On change");
18
23
setText ( event . target . value )
@@ -30,6 +35,7 @@ export default function TextForm(props) {
30
35
</ div >
31
36
< button className = "btn btn-primary mx-1" onClick = { handleUpClick } > Convert to Uppercase</ button >
32
37
< 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 >
33
39
</ div >
34
40
< div className = "container my-3" >
35
41
< h2 > Your text summary</ h2 >
You can’t perform that action at this time.
0 commit comments