Skip to content

Commit

Permalink
renamed a function in TextForm.js and added the reason why .mjs files…
Browse files Browse the repository at this point in the history
… are included
  • Loading branch information
heruit777 committed Oct 16, 2021
1 parent d58edf5 commit 5e220e2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions module1.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// This file is just for understand import & export in js. It is not related to this project

import dza, {a, c, d} from './module2.mjs'
console.log(dza);
console.log(c);
Expand Down
2 changes: 2 additions & 0 deletions module2.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// This file is just for understand import & export in js. It is not related to this project

const a = "Harry";
const b = "Rohan";
const c = "Aakash";
Expand Down
4 changes: 2 additions & 2 deletions src/components/TextForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default function TextForm(props) {
props.showAlert("Converted to uppercase!", "success");
}

const handleLoClick = ()=>{
const handleLowerClick = ()=>{
let newText = text.toLowerCase();
setText(newText)
props.showAlert("Converted to lowercase!", "success");
Expand Down Expand Up @@ -48,7 +48,7 @@ export default function TextForm(props) {
<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>
</div>
<button disabled={text.length===0} className="btn btn-primary mx-1 my-1" onClick={handleUpClick}>Convert to Uppercase</button>
<button disabled={text.length===0} className="btn btn-primary mx-1 my-1" onClick={handleLoClick}>Convert to Lowercase</button>
<button disabled={text.length===0} className="btn btn-primary mx-1 my-1" onClick={handleLowerClick}>Convert to Lowercase</button>
<button disabled={text.length===0} className="btn btn-primary mx-1 my-1" onClick={handleClearClick}>Clear Text</button>
<button disabled={text.length===0} className="btn btn-primary mx-1 my-1" onClick={handleCopy}>Copy Text</button>
<button disabled={text.length===0} className="btn btn-primary mx-1 my-1" onClick={handleExtraSpaces}>Remove Extra Spaces</button>
Expand Down

0 comments on commit 5e220e2

Please sign in to comment.