Skip to content

Commit

Permalink
Merge pull request #2 from torobucci/components
Browse files Browse the repository at this point in the history
Math magicians :Components
  • Loading branch information
torobucci committed Mar 29, 2023
2 parents cc5c5e4 + 7ba9072 commit adf2bb5
Show file tree
Hide file tree
Showing 18 changed files with 135 additions and 171 deletions.
37 changes: 19 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,23 @@

# 📗 Table of Contents

- [📖 About the Project](#about-project)
- [🛠 Built With](#built-with)
- [Tech Stack](#tech-stack)
- [Key Features](#key-features)
- [💻 Getting Started](#getting-started)
- [Setup](#setup)
- [Prerequisites](#prerequisites)
- [Install](#install)
- [Usage](#usage)
- [Run tests](#run-tests)
- [👥 Authors](#authors)
- [🔭 Future Features](#future-features)
- [🤝 Contributing](#contributing)
- [⭐️ Show your support](#support)
- [🙏 Acknowledgements](#acknowledgements)
- [📝 License](#license)
- [📗 Table of Contents](#-table-of-contents)
- [📖 **Math Magicians** ](#-math-magicians-)
- [🛠 Built With ](#-built-with-)
- [Tech Stack ](#tech-stack-)
- [Key Features ](#key-features-)
- [💻 Getting Started ](#-getting-started-)
- [Prerequisites](#prerequisites)
- [Setup](#setup)
- [Install](#install)
- [Usage](#usage)
- [Run tests](#run-tests)
- [👥 Author Kevin Toro](#-author-kevin-toro)
- [🔭 Future Features ](#-future-features-)
- [🤝 Contributing ](#-contributing-)
- [⭐️ Show your support ](#️-show-your-support-)
- [🙏 Acknowledgments ](#-acknowledgments-)
- [📝 License ](#-license-)

<!-- PROJECT DESCRIPTION -->

Expand Down Expand Up @@ -127,7 +128,7 @@ To run tests, run the following command:

Contributions, issues, and feature requests are welcome!

Feel free to check the [math-magicians](https://github.com/torobucci/math-magicians.git).
Feel free to check the [math-magicians](https://github.com/torobucci/math-magicians/issues).

<p align="right">(<a href="#readme-top">back to top</a>)</p>

Expand All @@ -143,7 +144,7 @@ If you like this project hit the star button on our github repo

## 🙏 Acknowledgments <a name="acknowledgements"></a>

I would like to thank the Lets Code team that hepled us in every problem we had.
I would like to thank Microverseinc organization for designing the project

<p align="right">(<a href="#readme-top">back to top</a>)</p>

Expand Down
Binary file removed public/favicon.ico
Binary file not shown.
4 changes: 2 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>Calculator App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand All @@ -40,4 +40,4 @@
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
</html>
Binary file removed public/logo192.png
Binary file not shown.
Binary file removed public/logo512.png
Binary file not shown.
25 changes: 0 additions & 25 deletions public/manifest.json

This file was deleted.

3 changes: 0 additions & 3 deletions public/robots.txt

This file was deleted.

39 changes: 0 additions & 39 deletions src/App.css

This file was deleted.

24 changes: 3 additions & 21 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,9 @@
import logo from './logo.svg';
import './App.css';
import DisplayCalculator from './components/DisplayCalculator';

function App() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit
{' '}
<code>src/App.js</code>
{' '}
and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
<div className="app">
<DisplayCalculator />
</div>
);
}
Expand Down
8 changes: 0 additions & 8 deletions src/App.test.js

This file was deleted.

26 changes: 26 additions & 0 deletions src/components/Buttons.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
function Buttons() {
return (
<>
<button type="button" className="button">A/C</button>
<button type="button" className="button">+/-</button>
<button type="button" className="button">%</button>
<button type="button" className="button operator">÷</button>
<button type="button" className="button">7</button>
<button type="button" className="button">8</button>
<button type="button" className="button">9</button>
<button type="button" className="button operator">x</button>
<button type="button" className="button">4</button>
<button type="button" className="button">5</button>
<button type="button" className="button">6</button>
<button type="button" className="button operator">-</button>
<button type="button" className="button">1</button>
<button type="button" className="button">2</button>
<button type="button" className="button">3</button>
<button type="button" className="button operator">+</button>
<button type="button" className="button zero">0</button>
<button type="button" className="button">.</button>
<button type="button" className="button operator">=</button>
</>
);
}
export default Buttons;
11 changes: 11 additions & 0 deletions src/components/DisplayCalculator.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import Buttons from './Buttons';

function DisplayCalculator() {
return (
<div className="calculator">
<input type="text" placeholder="0" className="input" />
<Buttons />
</div>
);
}
export default DisplayCalculator;
27 changes: 0 additions & 27 deletions src/index.css

This file was deleted.

8 changes: 1 addition & 7 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import './style.css';
import App from './App';
import reportWebVitals from './reportWebVitals';

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>
<App />
</React.StrictMode>,
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
1 change: 0 additions & 1 deletion src/logo.svg

This file was deleted.

15 changes: 0 additions & 15 deletions src/reportWebVitals.js

This file was deleted.

5 changes: 0 additions & 5 deletions src/setupTests.js

This file was deleted.

73 changes: 73 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
body {
font-family: Arial, sans-serif;
background-color: #928d8d;
}

.calculator {
width: 35vw;
margin: 12vh auto;
background-color: #d4cfcf;
border-radius: 3px;
padding: 2px 4px;
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-gap: 2px;
}

.input {
grid-column: 1 / span 4;
background-color: #6b6974;
font-size: 26px;
color: white;
padding: 20px 5px;
border-radius: 2px;
height: 30%;
border: none;
margin-bottom: -14px;
}

input:focus {
outline: none;
}

.input::placeholder {
text-align: right;
color: white;
}

.button {
height: 10vh;
font-size: 1.5rem;
background-color: #e6dfdf;
border-radius: 2px;
cursor: pointer;
border: none;
}

.button:hover {
background-color: #faf5f5;
}

.button:active {
background-color: #aaa;
}

.button.operator {
background-color: #ee9954;
}

.button.operator:hover {
background-color: #ee7d1b;
}

.button.operator:active {
background-color: #a34d17;
}

.button.zero {
grid-column: 1 / span 2;
}

.button.equals {
grid-row: span 2;
}

0 comments on commit adf2bb5

Please sign in to comment.