Skip to content

Commit

Permalink
Merge pull request #31 from UniqueClone/main
Browse files Browse the repository at this point in the history
Adding tooltip for max loan
  • Loading branch information
UniqueClone authored Jul 16, 2024
2 parents 2dbcfff + cd8557d commit 10eaf08
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions src/components/MaxLoanInput/MaxLoanInput.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { ITextFieldStyles, TextField } from "@fluentui/react";
import {
ITextFieldStyles,
Icon,
TextField,
TooltipHost,
} from "@fluentui/react";

export interface MaxLoanInputProps {
maxLoan: number;
Expand All @@ -17,7 +22,24 @@ export const MaxLoanInput: React.FC<MaxLoanInputProps> = (
return (
<TextField
type="number"
label="Max Loan"
onRenderLabel={() => {
return (
<div>
Max Loan{" "}
<TooltipHost
className="tooltip"
content="If you have your mortgage approval, you can put the max loan amount here.
Note: This is not the house value, it is the house value minus your deposit."
id="maxLoanTooltip"
>
<Icon
iconName="Info"
style={{ fontSize: "0.7778rem" }}
/>
</TooltipHost>
</div>
);
}}
styles={defaultTextFieldStyles}
value={maxLoan.toString()}
onChange={(_e, newValue) => {
Expand Down

0 comments on commit 10eaf08

Please sign in to comment.