-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
283 additions
and
253 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
import { Calendar } from 'primereact/calendar'; | ||
|
||
export default function DateSelect({ | ||
firstDate, | ||
setDate, | ||
selectedDate, | ||
disabled = true, | ||
firstDate, | ||
setDate, | ||
selectedDate, | ||
disabled = true, | ||
}) { | ||
return ( | ||
<div> | ||
<label htmlFor='monthPicker'>Starting Date</label> | ||
<Calendar | ||
inputId='monthPicker' | ||
value={selectedDate} | ||
disabled={disabled} | ||
onChange={(e) => setDate(e.value)} | ||
view='month' | ||
minDate={new Date(`${firstDate[0]}-${firstDate[1]}-15`)} | ||
maxDate={new Date()} | ||
dateFormat='mm/yy' | ||
tooltipOptions={{ position: 'mouse' }} | ||
tooltip="Since when do you have that income?" | ||
/> | ||
</div> | ||
); | ||
return ( | ||
<div> | ||
<label htmlFor='monthPicker'>Starting Date</label> | ||
<Calendar | ||
inputId='monthPicker' | ||
value={selectedDate} | ||
disabled={disabled} | ||
onChange={(e) => setDate(e.value)} | ||
view='month' | ||
minDate={new Date(`${firstDate[0]}-${firstDate[1]}-15`)} | ||
maxDate={new Date()} | ||
dateFormat='mm/yy' | ||
tooltipOptions={{ position: 'mouse' }} | ||
tooltip='Since when do you have that income?' | ||
/> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,19 @@ | ||
import { InputNumber } from 'primereact/inputnumber'; | ||
|
||
export default function SalaryInput({ | ||
salary, | ||
setSalary, | ||
selectedCountry, | ||
}) { | ||
return ( | ||
<div> | ||
<label htmlFor='salaryInput'>Monthly Income</label> | ||
<InputNumber | ||
inputId="salaryInput" | ||
value={salary} | ||
onValueChange={(e) => setSalary(e.value)} | ||
mode="currency" | ||
currency={selectedCountry?.currencyCode || 'USD'} | ||
disabled={!selectedCountry} | ||
tooltipOptions={{ position: 'bottom', appendTo: 'self' }} | ||
tooltip="What's your monthly income, in the selected country currency?" | ||
/> | ||
</div> | ||
); | ||
export default function SalaryInput({ salary, setSalary, selectedCountry }) { | ||
return ( | ||
<div> | ||
<label htmlFor='salaryInput'>Monthly Income</label> | ||
<InputNumber | ||
inputId='salaryInput' | ||
value={salary} | ||
onValueChange={(e) => setSalary(e.value)} | ||
mode='currency' | ||
currency={selectedCountry?.currencyCode || 'USD'} | ||
disabled={!selectedCountry} | ||
tooltipOptions={{ position: 'bottom', appendTo: 'self' }} | ||
tooltip="What's your monthly income, in the selected country currency?" | ||
/> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
e983c4d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
raise-calc – ./
raise-calc-git-master-spersico.vercel.app
raise-calc.vercel.app
raise-calc-spersico.vercel.app