Create, using React, an application named 'react-salario' that should be able to calculate the net salary from gross salary, considering the 2020 CLT rules.
- CSS
- HTML
- Javascript
- Class Components
- React
- Materialize
- Node.js
- For the horizontal bar, use the Determinate Linear Preloader available on Materialize.
<div class="progress">
<div class="determinate" style="width: 20%"></div>
<div class="determinate" style="width: 10%"></div>
</div>
- As the bar shall be a sum of net salary and IRPF and INSS discounts, you can consider the background color as the net salary bar.
- For the other two bars, you will use the determinate class. Remember that the first one declared will be overlapped by the second. So a tip is to add the value to be presented in the latter to the former and set the calculated width to the former.
- For the percentages and currency formatting, use the Intl library.
const currencyFormatter = Intl.NumberFormat('pt-BR', { style: 'currency', currency: 'BRL' });
const percentageFormatter = Intl.NumberFormat('pt-BR', { style: 'percent', maximumFractionDigits: 2 });
git clone https://github.com/ecpieritz/SalaryCalculator.git
cd SalaryCalculator
npm install
npm start
Developed with 💙 by Emilyn C. Pieritz