Skip to content

Commit 5e220e2

Browse files
committed
renamed a function in TextForm.js and added the reason why .mjs files are included
1 parent d58edf5 commit 5e220e2

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

Diff for: module1.mjs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// This file is just for understand import & export in js. It is not related to this project
2+
13
import dza, {a, c, d} from './module2.mjs'
24
console.log(dza);
35
console.log(c);

Diff for: module2.mjs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// This file is just for understand import & export in js. It is not related to this project
2+
13
const a = "Harry";
24
const b = "Rohan";
35
const c = "Aakash";

Diff for: src/components/TextForm.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default function TextForm(props) {
88
props.showAlert("Converted to uppercase!", "success");
99
}
1010

11-
const handleLoClick = ()=>{
11+
const handleLowerClick = ()=>{
1212
let newText = text.toLowerCase();
1313
setText(newText)
1414
props.showAlert("Converted to lowercase!", "success");
@@ -48,7 +48,7 @@ export default function TextForm(props) {
4848
<textarea className="form-control" value={text} onChange={handleOnChange} style={{backgroundColor: props.mode==='dark'?'#13466e':'white', color: props.mode==='dark'?'white':'#042743'}} id="myBox" rows="8"></textarea>
4949
</div>
5050
<button disabled={text.length===0} className="btn btn-primary mx-1 my-1" onClick={handleUpClick}>Convert to Uppercase</button>
51-
<button disabled={text.length===0} className="btn btn-primary mx-1 my-1" onClick={handleLoClick}>Convert to Lowercase</button>
51+
<button disabled={text.length===0} className="btn btn-primary mx-1 my-1" onClick={handleLowerClick}>Convert to Lowercase</button>
5252
<button disabled={text.length===0} className="btn btn-primary mx-1 my-1" onClick={handleClearClick}>Clear Text</button>
5353
<button disabled={text.length===0} className="btn btn-primary mx-1 my-1" onClick={handleCopy}>Copy Text</button>
5454
<button disabled={text.length===0} className="btn btn-primary mx-1 my-1" onClick={handleExtraSpaces}>Remove Extra Spaces</button>

0 commit comments

Comments
 (0)