The purpose of this repo is to demonstrate a functioning calculator that can toggle between standard numbers and roman numerals.
The app is running live on Heroku and can be found here.
A user interacts with the calculator by entering a first number, an operator, and then a second number. Once that is done, they can click the =
button to view the result. At any time, the user can toggle between standard number
mode and roman numeral
mode using the checkbox at the top of the screen.
To clear the calculator and start over, the user can click the C
button.
- Clone the repo (https://github.com/chrishuman0923/react_calculator.git)
- Run
npm install
- Run
npm start
- View the app in your browser at http://localhost:3000
This calculator was designed using the following:
- CRA (Create React App) Boilerplate
- React.js
- Typescript
- SCSS
- Heroku
- Github Actions
This calculator has a few limitations:
- It is purposefully limited to a max range of -10,000 to 10,000.
- This can be adjusted by changing the values in the
constants.ts
file. - If a user enters a number outside the defined limit of the calculator, the calculator will display an error message.
- This can be adjusted by changing the values in the
- When in
roman numeral
mode, the calculator will only accept values greater than0
.- Any attempt to perform calculations where the result is a value less than
0
will default back to0
.
- Any attempt to perform calculations where the result is a value less than