This is a solution to the Calculator app challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Users should be able to:
- See the size of the elements adjust based on their device's screen size
- Perform mathmatical operations like addition, subtraction, multiplication, and division
- Adjust the color theme based on their preference
- Bonus: Have their initial theme preference checked using
prefers-color-scheme
and have any additional changes saved in the browser
- Live Site URL: Vercel
- Mobile-first workflow
- React - JS library
- Next.js - React framework
- TailwindCSS - For CSS
- HeadlessUI - For Headless UI Components
I have learned how to switching themes and creating a working calculator following iOS calculator app. Even though it is easy when first thought about calculator but if deep deeper there is a lot of hidden logic that is not known.
There is some codes in here that I am proud of because it is my first time and I am managed to done it.
Lists:
./components/MultipleToggleSwitch.tsx
(Three way toggle)./styles/globals.css
&./tailwind.config.js
(Theme switching)
I would like to seperate more repetitive file into more smaller parts and tried out to call API because in this project there is no API to be called.
- Tailwind Theme Switcher - I am not experienced with theme switching before this but with this example I managed to figure out the way by looking through the source code.
- Frontend Mentor - @rezuankassim
- Twitter - @KassimRezuan
- LinkedIn - rezuan-kassim