Created
March 28, 2021 10:42
-
-
Save code08-ind/6fded2f73a0bcc305a0882ea6abbeda8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState } from 'react'; | |
import Button from '@material-ui/core/Button'; | |
import AddIcon from '@material-ui/icons/Add'; | |
import '../node_modules/bootstrap/dist/css/bootstrap.min.css'; | |
import '../node_modules/bootstrap/dist/js/bootstrap.bundle'; | |
const Calculator = () => { | |
const [add, setAdd] = useState(0); | |
const increment = () => { | |
setAdd(add + 1); | |
} | |
return ( | |
<> | |
<div className="container"> | |
<h1>{add}</h1> | |
<Button size="large" variant="contained" className="btns" onClick={increment}> | |
<AddIcon className="colorButton" /> | |
</Button> | |
</div> | |
</> | |
); | |
} | |
export default Calculator; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment