Design comparison
SolutionDesign
Solution retrospective
🔗 Links
- Github URL: Click here
- Live Site URL: Click here
🛠️ Technologies Used
- React JS
- TypeScript
- Styled-Components
- Framer Motion
- HTML5, CSS
🗒️ Key Features
- Implemented features similar to the Windows default calculator.
- Integer part is separated by commas, and decimal part is displayed without separation.
- Fully supports keyboard input.
- 0~9: Number input
- Enter: Display calculation result
- Backspace: Backspace during number input, reset during result display
- Esc: Reset
- User-selected theme is stored in local storage.
- After completion of calculation, the result can be copied to the clipboard by clicking.
- Clipboard copy is not available during calculation or when there is no calculation result.
- When copying is completed, a toast appears providing feedback.
🔴 Things I Want to Know
- I'd like to know if there are any issues regarding accessibility.
- I feel that the current code for the Calculator Component is unnecessarily complex. In particular, the logic with if statements determining cases based on
prevOperation
,currentOperation
, andoperand
states may be perceived as less readable to other developers. If you have any good tips on this matter, please share, and I would appreciate it.
Community feedback
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord