Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculator components #2

Merged
merged 8 commits into from Mar 15, 2022
Merged

Calculator components #2

merged 8 commits into from Mar 15, 2022

Conversation

iLynette
Copy link
Owner

In this project I implemented the following;

  • Create a directory called components.

  • Inside components, create a new Calculator.js file.

  • In Calculator.js, create a React component that matches the required design:

Copy link

@Emmyn5600 Emmyn5600 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @iLynette

Your project is complete! There is nothing else to say other than... it's time to merge it :shipit:
Congratulations! 🎉 👏 👏 💯

nodding-yes

Optional suggestions

  • Check the comment under the review

Every comment with the [OPTIONAL] prefix is not crucial enough to stop the approval of this PR. However, I strongly recommend you to take them into account as they can make your code better.

Cheers and Happy coding!:clap::clap::clap:

Feel free to leave any questions or comments in the PR thread if something is not 100% clear.


_As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.

Comment on lines +9 to +33
<div className="container">
<form>
<input type="text" />
</form>
<div className="keypad">
<div className="clear num">AC</div>
<div className="ad num">+/-</div>
<div className="modulo num">%</div>
<div className="divide operator">&divide;</div>
<div className="num">7</div>
<div className="num">8</div>
<div className="num">9</div>
<div className="times operator">&times;</div>
<div className="num">4</div>
<div className="num">5</div>
<div className="num">6</div>
<div className="clear operator">&ndash;</div>
<div className="num">1</div>
<div className="num">2</div>
<div className="num">3</div>
<div className="add operator">+</div>
<div className="zero">0</div>
<div className="num">.</div>
<div className="equals operator">=</div>
</div>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Instead of displaying the numbers as the text, I would recommend making them as the buttons. For example:

<button type="button" className="calc-btn">{text}</button?

You can implement this in another file and import it to the component/calculator.

image

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does look better. thank you @Emmyn5600 I will change it to this

@iLynette iLynette merged commit d1c0385 into development Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants