-
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.
Tweak Prettier config & add eslint-plugin-tailwindcss
- Loading branch information
Showing
54 changed files
with
1,003 additions
and
976 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
{ | ||
"extends": ["next/core-web-vitals", "prettier"] | ||
"extends": [ | ||
"next/core-web-vitals", | ||
"prettier", | ||
"plugin:tailwindcss/recommended" | ||
] | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"semi": false, | ||
"singleQuote": true, | ||
"trailingComma": "all" | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
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,14 +1,14 @@ | ||
import LoanType from "../../models/loanType"; | ||
import RepaymentStatus from "../../models/repaymentStatus"; | ||
import LoanType from '../../models/loanType' | ||
import RepaymentStatus from '../../models/repaymentStatus' | ||
|
||
export default interface Projection { | ||
repaymentStatus: RepaymentStatus; | ||
loanType: LoanType; | ||
debtRemaining: number; | ||
interestRate: number; | ||
paid: number; | ||
interestApplied: number; | ||
totalPaid: number; | ||
totalInterestApplied: number; | ||
threshold: number; | ||
repaymentStatus: RepaymentStatus | ||
loanType: LoanType | ||
debtRemaining: number | ||
interestRate: number | ||
paid: number | ||
interestApplied: number | ||
totalPaid: number | ||
totalInterestApplied: number | ||
threshold: number | ||
} |
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,14 +1,14 @@ | ||
import { DateTime } from "luxon"; | ||
import Projection from "./projection"; | ||
import { DateTime } from 'luxon' | ||
import Projection from './projection' | ||
|
||
export default interface Result { | ||
period: number; | ||
periodDate: DateTime; | ||
salary: number; | ||
projections: Projection[]; | ||
aggregatedDebtRemaining: number; | ||
aggregatedPaidInPeriod: number; | ||
aggregatedInterestAppliedInPeriod: number; | ||
aggregatedTotalInterestApplied: number; | ||
aggregatedTotalPaid: number; | ||
period: number | ||
periodDate: DateTime | ||
salary: number | ||
projections: Projection[] | ||
aggregatedDebtRemaining: number | ||
aggregatedPaidInPeriod: number | ||
aggregatedInterestAppliedInPeriod: number | ||
aggregatedTotalInterestApplied: number | ||
aggregatedTotalPaid: number | ||
} |
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,10 +1,10 @@ | ||
import { DateTime } from "luxon"; | ||
import Result from "./result"; | ||
import { DateTime } from 'luxon' | ||
import Result from './result' | ||
|
||
export interface Results { | ||
results: Result[]; | ||
debtClearedDate: DateTime; | ||
debtClearedNumberOfPeriods: number; | ||
totalPaid: number; | ||
totalInterestApplied: number; | ||
results: Result[] | ||
debtClearedDate: DateTime | ||
debtClearedNumberOfPeriods: number | ||
totalPaid: number | ||
totalInterestApplied: number | ||
} |
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
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,47 +1,47 @@ | ||
import { forwardRef } from "react"; | ||
import { forwardRef } from 'react' | ||
|
||
interface CheckboxProps extends React.InputHTMLAttributes<HTMLInputElement> { | ||
id: string; | ||
placeholder?: string; | ||
label: string; | ||
type?: string; | ||
error?: boolean; | ||
errorText?: string; | ||
required?: boolean; | ||
children?: React.ReactNode; | ||
id: string | ||
placeholder?: string | ||
label: string | ||
type?: string | ||
error?: boolean | ||
errorText?: string | ||
required?: boolean | ||
children?: React.ReactNode | ||
} | ||
|
||
const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>( | ||
function InputGroup(props: CheckboxProps, ref) { | ||
const { | ||
id, | ||
label = "", | ||
label = '', | ||
error = false, | ||
errorText = "", | ||
errorText = '', | ||
required = false, | ||
...rest | ||
} = props; | ||
} = props | ||
|
||
return ( | ||
<> | ||
<input | ||
ref={ref} | ||
type="checkbox" | ||
className={`border bg-gray-50 text-gray-900 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 p-2.5 font-light text-sm w-4 h-4 rounded ${ | ||
error ? "border-red-600" : "border-gray-300" | ||
className={`size-4 rounded border bg-gray-50 p-2.5 text-sm font-light text-gray-900 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500 ${ | ||
error ? 'border-red-600' : 'border-gray-300' | ||
}`} | ||
id={id} | ||
{...rest} | ||
/> | ||
<label htmlFor={id} className="ml-2 mb-1"> | ||
<label htmlFor={id} className="mb-1 ml-2"> | ||
{label} {required && <span className="text-red-600">*</span>} | ||
</label> | ||
{errorText && ( | ||
<p className="text-xs pl-2 text-red-600 mt-1">{errorText}</p> | ||
<p className="mt-1 pl-2 text-xs text-red-600">{errorText}</p> | ||
)} | ||
</> | ||
); | ||
) | ||
}, | ||
); | ||
) | ||
|
||
export default Checkbox; | ||
export default Checkbox |
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,19 +1,19 @@ | ||
import classNames from "classnames"; | ||
import classNames from 'classnames' | ||
|
||
export type ContainerProps = { | ||
children?: React.ReactNode; | ||
className?: string; | ||
}; | ||
children?: React.ReactNode | ||
className?: string | ||
} | ||
|
||
export const Container = ({ className, children }: ContainerProps) => { | ||
return ( | ||
<div | ||
className={classNames( | ||
"mx-0 p-8 sm:mx-8 max-w-7xl bg-white shadow-lg", | ||
className | ||
'mx-0 p-8 sm:mx-8 max-w-7xl bg-white shadow-lg', | ||
className, | ||
)} | ||
> | ||
{children} | ||
</div> | ||
); | ||
}; | ||
) | ||
} |
Oops, something went wrong.