homeflowjs 0.11.4 → 0.11.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -9,6 +9,8 @@ const StampDutyCalculator = ({ scotland, themePreferences }) => {
|
|
9
9
|
const [type, setType] = useState('residential');
|
10
10
|
const [purchaseType, setPurchaseType] = useState('firstTimeBuyer')
|
11
11
|
const [purchasePrice, setPurchasePrice] = useState();
|
12
|
+
const [firstTimeBuyer, setFirstTimeBuyer] = useState(false);
|
13
|
+
const [additionalProperty, setAdditionalProperty] = useState(false);
|
12
14
|
|
13
15
|
const renderCalculator = () => {
|
14
16
|
if (type === 'residential') {
|
@@ -16,8 +18,8 @@ const StampDutyCalculator = ({ scotland, themePreferences }) => {
|
|
16
18
|
<DefaultCalculator
|
17
19
|
purchasePrice={purchasePrice}
|
18
20
|
setPurchasePrice={setPurchasePrice}
|
19
|
-
firstTimeBuyer={
|
20
|
-
additionalProperty={
|
21
|
+
firstTimeBuyer={firstTimeBuyer}
|
22
|
+
additionalProperty={additionalProperty}
|
21
23
|
ukResident
|
22
24
|
/>
|
23
25
|
);
|
@@ -61,22 +63,22 @@ const StampDutyCalculator = ({ scotland, themePreferences }) => {
|
|
61
63
|
</div>
|
62
64
|
<div className="switches">
|
63
65
|
<div className="form-group">
|
64
|
-
<
|
65
|
-
type="
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
</
|
66
|
+
<input
|
67
|
+
type="checkbox"
|
68
|
+
id="firstTime"
|
69
|
+
checked={firstTimeBuyer}
|
70
|
+
onChange={() => setFirstTimeBuyer(prev => !prev)}
|
71
|
+
/>
|
72
|
+
<label htmlFor="firstTime">First Time Buyer</label>
|
71
73
|
</div>
|
72
74
|
<div className="form-group">
|
73
|
-
<
|
74
|
-
type="
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
</
|
75
|
+
<input
|
76
|
+
type="checkbox"
|
77
|
+
id="additionalProperty"
|
78
|
+
checked={additionalProperty}
|
79
|
+
onChange={() => setAdditionalProperty(prev => !prev)}
|
80
|
+
/>
|
81
|
+
<label htmlFor="additionalProperty">Additional Property</label>
|
80
82
|
</div>
|
81
83
|
</div>
|
82
84
|
{renderCalculator()}
|