Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zun-liang/fem-tip-calculator-app

Frontend Mentor Challenge Solution Tip Calculator App
https://github.com/zun-liang/fem-tip-calculator-app

css html javascript react reactjs

Last synced: 9 days ago
JSON representation

Frontend Mentor Challenge Solution Tip Calculator App

Awesome Lists containing this project

README

        

# Frontend Mentor - Tip calculator app solution

This is a solution to the [Tip calculator app challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/tip-calculator-app-ugJNGbJUX). Frontend Mentor challenges help you improve your coding skills by building realistic projects.

## Table of contents

- [Overview](#overview)
- [The challenge](#the-challenge)
- [Screenshot](#screenshot)
- [Links](#links)
- [My process](#my-process)
- [Built with](#built-with)
- [Continued development](#continued-development)
- [Useful resources](#useful-resources)
- [Author](#author)
- [Acknowledgments](#acknowledgments)

## Overview

### The challenge

Users should be able to:

- View the optimal layout for the app depending on their device's screen size
- See hover states for all interactive elements on the page
- Calculate the correct tip and total cost of the bill per person

### Screenshot

- screenshot-desktop: [here](./screenshots/screenshot-desktop.png)
- screenshot-mobile: [here](./screenshots/screenshot-mobile.png)

### Links

- Solution URL: [here](https://www.frontendmentor.io/solutions/tip-calculator-app-using-reactjs-u773PtPOnL)
- Live Site URL: [here](https://zun-liang.github.io/fem-tip-calculator-app/)

## My process

### Built with

- React.JS
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
- CSS Grid
- Mobile-first workflow

### Continued development

- React hooks
- API

### Useful resources

- [How to Convert a String to a Number in JavaScript](https://www.freecodecamp.org/news/how-to-convert-a-string-to-a-number-in-javascript/)
- [How TO - Hide Arrows From Input Number](https://www.w3schools.com/howto/howto_css_hide_arrow_number.asp)
- [HTML Input Types](https://www.w3schools.com/html/html_form_input_types.asp)

## Author

- Website - [Zun Liang](https://zunldev.com/)
- GitHub - [@zun-liang](https://github.com/zun-liang)
- Frontend Mentor - [@zun-liang](https://www.frontendmentor.io/profile/zun-liang)
- freeCodeCamp - [@zun-liang](https://www.freecodecamp.org/zun-liang)

## Acknowledgments

A special thank you goes out to [@gurvirbaraich](https://github.com/gurvirbaraich) for his valuable contribution to this challenge! He spotted a critical bug related to the "numOfPeople" property, which could have allowed non-integer values. Although I chose to fix the bug myself for self-practice purposes, his keen observation and proposed solution would have greatly improved the challenge's quality. Please take a look at his wonderful [solution](https://github.com/zun-liang/tip-calculator-app-main/pull/1/commits/745ba783589379c45fa8486c9a66a3985f6320dd)!