@comicrelief/component-library 7.14.0 → 7.16.0
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/cypress/integration/components/Organisms/Donate.spec.js +19 -7
- package/dist/components/Molecules/CardDs/CardDs.js +2 -1
- package/dist/components/Molecules/CardDs/__snapshots__/CardDs.test.js.snap +1 -0
- package/dist/components/Molecules/SingleMessageDS/SingleMessageDs.js +5 -4
- package/dist/components/Molecules/SingleMessageDS/__snapshots__/SingleMessageDs.test.js.snap +1 -0
- package/dist/components/Organisms/Donate/Donate.md +10 -1
- package/dist/components/Organisms/Donate/Form/Form.js +51 -10
- package/dist/components/Organisms/Donate/__snapshots__/Donate.test.js.snap +51 -35
- package/package.json +5 -6
- package/src/components/Molecules/CardDs/CardDs.js +1 -0
- package/src/components/Molecules/CardDs/__snapshots__/CardDs.test.js.snap +1 -0
- package/src/components/Molecules/SingleMessageDS/SingleMessageDs.js +2 -1
- package/src/components/Molecules/SingleMessageDS/__snapshots__/SingleMessageDs.test.js.snap +1 -0
- package/src/components/Organisms/Donate/Donate.md +10 -1
- package/src/components/Organisms/Donate/Form/Form.js +65 -6
- package/src/components/Organisms/Donate/__snapshots__/Donate.test.js.snap +51 -35
|
@@ -76,8 +76,12 @@ describe('Donate component', () => {
|
|
|
76
76
|
.find('p.error--amount')
|
|
77
77
|
.contains('Please enter an amount between £1 and £25000 and up to 2 decimal places');
|
|
78
78
|
cy.get('@container')
|
|
79
|
-
.find('
|
|
80
|
-
.
|
|
79
|
+
.find('[id="mship-1--MoneyBuy-userInput"]')
|
|
80
|
+
.clear()
|
|
81
|
+
.type('16');
|
|
82
|
+
cy.get('@container')
|
|
83
|
+
.find('form > fieldset > button')
|
|
84
|
+
.contains('Donate £16 monthly');
|
|
81
85
|
cy.get('@container')
|
|
82
86
|
.find('h2')
|
|
83
87
|
.should('exist');
|
|
@@ -138,8 +142,12 @@ describe('Donate component', () => {
|
|
|
138
142
|
.find('p.error--amount')
|
|
139
143
|
.should('contain', 'Please enter an amount between £1 and £25000 and up to 2 decimal places');
|
|
140
144
|
cy.get('@container')
|
|
141
|
-
.find('
|
|
142
|
-
.
|
|
145
|
+
.find('[id="mship-2--MoneyBuy-userInput"]')
|
|
146
|
+
.clear()
|
|
147
|
+
.type('179');
|
|
148
|
+
cy.get('@container')
|
|
149
|
+
.find('form > fieldset > button')
|
|
150
|
+
.contains('Donate £179 now');
|
|
143
151
|
cy.get('@container')
|
|
144
152
|
.find('h2')
|
|
145
153
|
.should('exist');
|
|
@@ -199,8 +207,12 @@ describe('Donate component', () => {
|
|
|
199
207
|
.find('p.error--amount')
|
|
200
208
|
.contains('Please enter an amount between £1 and £25000 and up to 2 decimal places');
|
|
201
209
|
cy.get('@container')
|
|
202
|
-
.find('
|
|
203
|
-
.
|
|
210
|
+
.find('[id="mship-3--MoneyBuy-userInput"]')
|
|
211
|
+
.clear()
|
|
212
|
+
.type('898');
|
|
213
|
+
cy.get('@container')
|
|
214
|
+
.find('form > fieldset > button')
|
|
215
|
+
.contains('Donate £898 now');
|
|
204
216
|
cy.get('@container')
|
|
205
217
|
.find('h2')
|
|
206
218
|
.should('exist');
|
|
@@ -258,7 +270,7 @@ describe('Donate component', () => {
|
|
|
258
270
|
.type('5')
|
|
259
271
|
.should('not.have', 'Please enter an amount between £1 and £250000 and up to 2 decimal places');
|
|
260
272
|
cy.get('@container')
|
|
261
|
-
.find('form > fieldset >
|
|
273
|
+
.find('form > fieldset > button')
|
|
262
274
|
.contains('Donate');
|
|
263
275
|
cy.get('@container')
|
|
264
276
|
.find('h2')
|
|
@@ -53,8 +53,7 @@ var SingleMessageDs = function SingleMessageDs(_ref) {
|
|
|
53
53
|
var _useState = (0, _react.useState)(false),
|
|
54
54
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
55
55
|
isOpen = _useState2[0],
|
|
56
|
-
setIsOpen = _useState2[1];
|
|
57
|
-
|
|
56
|
+
setIsOpen = _useState2[1];
|
|
58
57
|
|
|
59
58
|
var closeModal = function closeModal() {
|
|
60
59
|
return setIsOpen(false);
|
|
@@ -77,7 +76,8 @@ var SingleMessageDs = function SingleMessageDs(_ref) {
|
|
|
77
76
|
"aria-hidden": "true",
|
|
78
77
|
tabIndex: "-1",
|
|
79
78
|
href: link,
|
|
80
|
-
target: target
|
|
79
|
+
target: target,
|
|
80
|
+
"data-cta-copy": linkLabel
|
|
81
81
|
}, rest), Media);
|
|
82
82
|
}
|
|
83
83
|
|
|
@@ -87,7 +87,8 @@ var SingleMessageDs = function SingleMessageDs(_ref) {
|
|
|
87
87
|
"aria-hidden": "true",
|
|
88
88
|
tabIndex: "-1",
|
|
89
89
|
href: youTubeId,
|
|
90
|
-
target: target
|
|
90
|
+
target: target,
|
|
91
|
+
"data-cta-copy": linkLabel
|
|
91
92
|
}, rest, {
|
|
92
93
|
onClick: function onClick(e) {
|
|
93
94
|
setIsOpen(true);
|
|
@@ -11,7 +11,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
11
11
|
alt="Background image"
|
|
12
12
|
mobileBackgroundColor="deep_violet_dark"
|
|
13
13
|
desktopOverlayColor="red"
|
|
14
|
-
|
|
14
|
+
submitButtonColor="blue_dark"
|
|
15
15
|
formAlignRight={true}
|
|
16
16
|
imageLow={desktopPictures.imageLow}
|
|
17
17
|
images={desktopPictures.images}
|
|
@@ -35,6 +35,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
35
35
|
|
|
36
36
|
<Donate
|
|
37
37
|
mobileBackgroundColor="blue_dark"
|
|
38
|
+
submitButtonColor="blue_dark"
|
|
38
39
|
desktopOverlayColor="blue_dark"
|
|
39
40
|
formAlignRight={false}
|
|
40
41
|
imageLow={desktopPictures.imageLow}
|
|
@@ -61,6 +62,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
61
62
|
|
|
62
63
|
<Donate
|
|
63
64
|
mobileBackgroundColor="blue_dark"
|
|
65
|
+
submitButtonColor="blue_dark"
|
|
64
66
|
desktopOverlayColor="blue_dark"
|
|
65
67
|
formAlignRight={false}
|
|
66
68
|
imageLow={desktopPictures.imageLow}
|
|
@@ -86,6 +88,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
86
88
|
|
|
87
89
|
<Donate
|
|
88
90
|
mobileBackgroundColor="blue_dark"
|
|
91
|
+
submitButtonColor="blue_dark"
|
|
89
92
|
desktopOverlayColor="blue_dark"
|
|
90
93
|
formAlignRight={false}
|
|
91
94
|
imageLow={desktopPictures.imageLow}
|
|
@@ -209,6 +212,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
209
212
|
<Donate
|
|
210
213
|
alt="Background image"
|
|
211
214
|
mobileBackgroundColor="transparent"
|
|
215
|
+
submitButtonColor="blue_dark"
|
|
212
216
|
desktopOverlayColor="transparent"
|
|
213
217
|
formAlignRight={true}
|
|
214
218
|
imageLow={desktopPictures.imageLow}
|
|
@@ -234,6 +238,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
234
238
|
|
|
235
239
|
<Donate
|
|
236
240
|
mobileBackgroundColor="transparent"
|
|
241
|
+
submitButtonColor="blue_dark"
|
|
237
242
|
formAlignRight={false}
|
|
238
243
|
imageLow={desktopPictures.imageLow}
|
|
239
244
|
images={desktopPictures.images}
|
|
@@ -258,6 +263,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
258
263
|
|
|
259
264
|
<Donate
|
|
260
265
|
mobileBackgroundColor="blue_dark"
|
|
266
|
+
submitButtonColor="blue_dark"
|
|
261
267
|
formAlignRight={false}
|
|
262
268
|
imageLow={desktopPictures.imageLow}
|
|
263
269
|
images={desktopPictures.images}
|
|
@@ -282,6 +288,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
282
288
|
|
|
283
289
|
<Donate
|
|
284
290
|
mobileBackgroundColor="blue_dark"
|
|
291
|
+
submitButtonColor="blue_dark"
|
|
285
292
|
formAlignRight={false}
|
|
286
293
|
imageLow={desktopPictures.imageLow}
|
|
287
294
|
images={desktopPictures.images}
|
|
@@ -305,6 +312,7 @@ import data from './dev-data/data-single';
|
|
|
305
312
|
|
|
306
313
|
<Donate
|
|
307
314
|
desktopOverlayColor="blue_dark"
|
|
315
|
+
submitButtonColor="blue_dark"
|
|
308
316
|
mobileBackgroundColor="blue_dark"
|
|
309
317
|
formAlignRight={false}
|
|
310
318
|
data={data}
|
|
@@ -329,6 +337,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
329
337
|
<Donate
|
|
330
338
|
alt="Background image"
|
|
331
339
|
mobileBackgroundColor="red"
|
|
340
|
+
submitButtonColor="blue_dark"
|
|
332
341
|
desktopOverlayColor="red"
|
|
333
342
|
formAlignRight={true}
|
|
334
343
|
imageLow={desktopPictures.imageLow}
|
|
@@ -57,7 +57,7 @@ var Signup = function Signup(_ref) {
|
|
|
57
57
|
errorMsg = _useState4[0],
|
|
58
58
|
setErrorMsg = _useState4[1];
|
|
59
59
|
|
|
60
|
-
var _useState5 = (0, _react.useState)(
|
|
60
|
+
var _useState5 = (0, _react.useState)(10),
|
|
61
61
|
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
62
62
|
amountDonate = _useState6[0],
|
|
63
63
|
setAmountDonate = _useState6[1];
|
|
@@ -137,7 +137,50 @@ var Signup = function Signup(_ref) {
|
|
|
137
137
|
}, [otherAmountValue, setAmountDonate]); // Create money buy boxes
|
|
138
138
|
|
|
139
139
|
var givingData = givingType === 'single' ? singleGiving : regularGiving;
|
|
140
|
-
var showGivingSelector = singleGiving !== null && regularGiving !== null;
|
|
140
|
+
var showGivingSelector = singleGiving !== null && regularGiving !== null; // Create ref for amount input
|
|
141
|
+
|
|
142
|
+
var amountRef = (0, _react.useRef)(null); // Create ref for amount button
|
|
143
|
+
|
|
144
|
+
var buttonRef = (0, _react.useRef)(null);
|
|
145
|
+
var handleClickOutside = (0, _react.useCallback)(function (event) {
|
|
146
|
+
if (!errorMsg) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
if (buttonRef.current && event.target === buttonRef.current) {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
if (amountRef.current && !amountRef.current.contains(event.target)) {
|
|
155
|
+
// Check the 2nd moneybuy exists before using it;
|
|
156
|
+
// 'philantrophy' carts have been set up to use a single moneybuy.
|
|
157
|
+
// See ENG-1685 for more details
|
|
158
|
+
var thisAmount = givingData.moneybuys[1] ? givingData.moneybuys[1].value : givingData.moneybuys[0].value;
|
|
159
|
+
setAmountDonate(parseFloat(thisAmount));
|
|
160
|
+
}
|
|
161
|
+
}, [errorMsg, givingData.moneybuys]); // Listen for click outside custom amount input if there is no value entered.
|
|
162
|
+
|
|
163
|
+
(0, _react.useEffect)(function () {
|
|
164
|
+
// Bind the event listener
|
|
165
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
166
|
+
return function () {
|
|
167
|
+
// Unbind the event listener on clean up
|
|
168
|
+
document.removeEventListener('mousedown', handleClickOutside);
|
|
169
|
+
};
|
|
170
|
+
}, [errorMsg, handleClickOutside]); // Create function to conditionally render button text
|
|
171
|
+
|
|
172
|
+
var renderButtonText = function renderButtonText() {
|
|
173
|
+
if (errorMsg) {
|
|
174
|
+
return 'Donate';
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
if (givingType === 'single') {
|
|
178
|
+
return "Donate \xA3".concat((0, _Membership.amountFormatter)(amountDonate), " now");
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
return "Donate \xA3".concat((0, _Membership.amountFormatter)(amountDonate), " monthly");
|
|
182
|
+
};
|
|
183
|
+
|
|
141
184
|
return /*#__PURE__*/_react.default.createElement(_Donate.FormWrapper, null, showGivingSelector && /*#__PURE__*/_react.default.createElement(_GivingSelector.default, {
|
|
142
185
|
givingType: givingType,
|
|
143
186
|
changeGivingType: function changeGivingType(data) {
|
|
@@ -190,7 +233,8 @@ var Signup = function Signup(_ref) {
|
|
|
190
233
|
onChange: function onChange(e) {
|
|
191
234
|
return setAmountDonate(parseFloat(e.target.value));
|
|
192
235
|
},
|
|
193
|
-
"aria-label": "Input a different amount"
|
|
236
|
+
"aria-label": "Input a different amount",
|
|
237
|
+
ref: amountRef
|
|
194
238
|
}))), amountDonate >= 1 && !noMoneyBuys && moneyBuyCopy && /*#__PURE__*/_react.default.createElement(_Donate.Copy, {
|
|
195
239
|
as: "p"
|
|
196
240
|
}, /*#__PURE__*/_react.default.createElement("strong", null, "\xA3".concat(amountDonate.toFixed(2), " ")), moneyBuyCopy), errorMsg && /*#__PURE__*/_react.default.createElement(_Donate.Error, {
|
|
@@ -198,15 +242,12 @@ var Signup = function Signup(_ref) {
|
|
|
198
242
|
tag: "p"
|
|
199
243
|
}, "Please enter an amount between \xA31 and \xA325000 and up to 2 decimal places"), noMoneyBuys ? /*#__PURE__*/_react.default.createElement(_Donate.Button, {
|
|
200
244
|
type: "submit",
|
|
201
|
-
as: "input",
|
|
202
|
-
value: "Donate",
|
|
203
245
|
color: submitButtonColor
|
|
204
|
-
}) : /*#__PURE__*/_react.default.createElement(_Donate.Button, {
|
|
246
|
+
}, errorMsg ? 'Donate' : "Donate \xA3".concat((0, _Membership.amountFormatter)(amountDonate))) : /*#__PURE__*/_react.default.createElement(_Donate.Button, {
|
|
205
247
|
type: "submit",
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
}))));
|
|
248
|
+
color: submitButtonColor,
|
|
249
|
+
ref: buttonRef
|
|
250
|
+
}, renderButtonText()))));
|
|
210
251
|
};
|
|
211
252
|
|
|
212
253
|
Signup.defaultProps = {
|
|
@@ -637,12 +637,13 @@ exports[`"Single Giving, No Money Buys, with overridden manual input value" rend
|
|
|
637
637
|
|
|
638
638
|
</label>
|
|
639
639
|
</div>
|
|
640
|
-
<
|
|
640
|
+
<button
|
|
641
641
|
className="c24"
|
|
642
642
|
color="red"
|
|
643
643
|
type="submit"
|
|
644
|
-
|
|
645
|
-
|
|
644
|
+
>
|
|
645
|
+
Donate £345.67
|
|
646
|
+
</button>
|
|
646
647
|
</fieldset>
|
|
647
648
|
</form>
|
|
648
649
|
</div>
|
|
@@ -955,6 +956,11 @@ exports[`Monthly donation renders correctly 1`] = `
|
|
|
955
956
|
}
|
|
956
957
|
|
|
957
958
|
.c28 {
|
|
959
|
+
line-height: 1.5;
|
|
960
|
+
margin-top: 2rem;
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
.c29 {
|
|
958
964
|
width: 100%;
|
|
959
965
|
margin: 2rem 0 2rem;
|
|
960
966
|
color: #FFFFFF;
|
|
@@ -973,9 +979,9 @@ exports[`Monthly donation renders correctly 1`] = `
|
|
|
973
979
|
appearance: none;
|
|
974
980
|
}
|
|
975
981
|
|
|
976
|
-
.
|
|
977
|
-
.
|
|
978
|
-
.
|
|
982
|
+
.c29:active,
|
|
983
|
+
.c29:focus,
|
|
984
|
+
.c29:hover {
|
|
979
985
|
outline: none;
|
|
980
986
|
background-color: #961D35;
|
|
981
987
|
}
|
|
@@ -1225,7 +1231,7 @@ exports[`Monthly donation renders correctly 1`] = `
|
|
|
1225
1231
|
}
|
|
1226
1232
|
|
|
1227
1233
|
@media (min-width:740px) {
|
|
1228
|
-
.
|
|
1234
|
+
.c29 {
|
|
1229
1235
|
padding: 1rem 2rem;
|
|
1230
1236
|
}
|
|
1231
1237
|
}
|
|
@@ -1478,18 +1484,26 @@ exports[`Monthly donation renders correctly 1`] = `
|
|
|
1478
1484
|
required={false}
|
|
1479
1485
|
step="0.01"
|
|
1480
1486
|
type="number"
|
|
1481
|
-
value="
|
|
1487
|
+
value="10"
|
|
1482
1488
|
/>
|
|
1483
1489
|
</div>
|
|
1484
1490
|
|
|
1485
1491
|
</label>
|
|
1486
1492
|
</div>
|
|
1487
|
-
<
|
|
1493
|
+
<p
|
|
1488
1494
|
className="c28"
|
|
1495
|
+
>
|
|
1496
|
+
<strong>
|
|
1497
|
+
£10.00
|
|
1498
|
+
</strong>
|
|
1499
|
+
</p>
|
|
1500
|
+
<button
|
|
1501
|
+
className="c29"
|
|
1489
1502
|
color="red"
|
|
1490
1503
|
type="submit"
|
|
1491
|
-
|
|
1492
|
-
|
|
1504
|
+
>
|
|
1505
|
+
Donate £10 now
|
|
1506
|
+
</button>
|
|
1493
1507
|
</fieldset>
|
|
1494
1508
|
</form>
|
|
1495
1509
|
</div>
|
|
@@ -1594,11 +1608,11 @@ exports[`Single donation renders correctly 1`] = `
|
|
|
1594
1608
|
font-size: 1.25rem;
|
|
1595
1609
|
}
|
|
1596
1610
|
|
|
1597
|
-
.
|
|
1611
|
+
.c18 {
|
|
1598
1612
|
display: block;
|
|
1599
1613
|
}
|
|
1600
1614
|
|
|
1601
|
-
.
|
|
1615
|
+
.c18 input {
|
|
1602
1616
|
border: none;
|
|
1603
1617
|
background-color: #BECCF9;
|
|
1604
1618
|
color: #000000;
|
|
@@ -1608,23 +1622,30 @@ exports[`Single donation renders correctly 1`] = `
|
|
|
1608
1622
|
border-radius: 10px;
|
|
1609
1623
|
box-shadow: 0px 0px 16px rgba(0,0,0,0.15);
|
|
1610
1624
|
height: auto;
|
|
1625
|
+
background-color: #0565D1;
|
|
1626
|
+
box-shadow: 0px 0px 16px rgba(0,0,0,0.3);
|
|
1627
|
+
color: #FFFFFF;
|
|
1611
1628
|
}
|
|
1612
1629
|
|
|
1613
|
-
.
|
|
1630
|
+
.c18 input:focus {
|
|
1614
1631
|
border: none;
|
|
1615
1632
|
outline: none;
|
|
1616
1633
|
box-shadow: inset 0 0 0 4px #0565D1;
|
|
1617
1634
|
}
|
|
1618
1635
|
|
|
1619
|
-
.
|
|
1636
|
+
.c18 input:active:focus {
|
|
1620
1637
|
box-shadow: 0px 0px 16px rgba(0,0,0,0.3);
|
|
1621
1638
|
}
|
|
1622
1639
|
|
|
1623
|
-
.c18 {
|
|
1640
|
+
.c18 input:focus {
|
|
1641
|
+
box-shadow: 0px 0px 16px rgba(0,0,0,0.3);
|
|
1642
|
+
}
|
|
1643
|
+
|
|
1644
|
+
.c13 {
|
|
1624
1645
|
display: block;
|
|
1625
1646
|
}
|
|
1626
1647
|
|
|
1627
|
-
.
|
|
1648
|
+
.c13 input {
|
|
1628
1649
|
border: none;
|
|
1629
1650
|
background-color: #BECCF9;
|
|
1630
1651
|
color: #000000;
|
|
@@ -1634,22 +1655,15 @@ exports[`Single donation renders correctly 1`] = `
|
|
|
1634
1655
|
border-radius: 10px;
|
|
1635
1656
|
box-shadow: 0px 0px 16px rgba(0,0,0,0.15);
|
|
1636
1657
|
height: auto;
|
|
1637
|
-
background-color: #0565D1;
|
|
1638
|
-
box-shadow: 0px 0px 16px rgba(0,0,0,0.3);
|
|
1639
|
-
color: #FFFFFF;
|
|
1640
1658
|
}
|
|
1641
1659
|
|
|
1642
|
-
.
|
|
1660
|
+
.c13 input:focus {
|
|
1643
1661
|
border: none;
|
|
1644
1662
|
outline: none;
|
|
1645
1663
|
box-shadow: inset 0 0 0 4px #0565D1;
|
|
1646
1664
|
}
|
|
1647
1665
|
|
|
1648
|
-
.
|
|
1649
|
-
box-shadow: 0px 0px 16px rgba(0,0,0,0.3);
|
|
1650
|
-
}
|
|
1651
|
-
|
|
1652
|
-
.c18 input:focus {
|
|
1666
|
+
.c13 input:active:focus {
|
|
1653
1667
|
box-shadow: 0px 0px 16px rgba(0,0,0,0.3);
|
|
1654
1668
|
}
|
|
1655
1669
|
|
|
@@ -1878,14 +1892,14 @@ exports[`Single donation renders correctly 1`] = `
|
|
|
1878
1892
|
}
|
|
1879
1893
|
|
|
1880
1894
|
@media (min-width:740px) {
|
|
1881
|
-
.
|
|
1895
|
+
.c18 input {
|
|
1882
1896
|
font-size: 2rem;
|
|
1883
1897
|
padding: 1.5rem;
|
|
1884
1898
|
}
|
|
1885
1899
|
}
|
|
1886
1900
|
|
|
1887
1901
|
@media (min-width:740px) {
|
|
1888
|
-
.
|
|
1902
|
+
.c13 input {
|
|
1889
1903
|
font-size: 2rem;
|
|
1890
1904
|
padding: 1.5rem;
|
|
1891
1905
|
}
|
|
@@ -2197,12 +2211,13 @@ exports[`Single donation renders correctly 1`] = `
|
|
|
2197
2211
|
</strong>
|
|
2198
2212
|
a support worker to visit 10 isolated young mums with postnatal depression in the UK.
|
|
2199
2213
|
</p>
|
|
2200
|
-
<
|
|
2214
|
+
<button
|
|
2201
2215
|
className="c24"
|
|
2202
2216
|
color="red"
|
|
2203
2217
|
type="submit"
|
|
2204
|
-
|
|
2205
|
-
|
|
2218
|
+
>
|
|
2219
|
+
Donate £20 now
|
|
2220
|
+
</button>
|
|
2206
2221
|
</fieldset>
|
|
2207
2222
|
</form>
|
|
2208
2223
|
</div>
|
|
@@ -2650,18 +2665,19 @@ exports[`Single donation with no Money Buys renders correctly 1`] = `
|
|
|
2650
2665
|
required={false}
|
|
2651
2666
|
step="0.01"
|
|
2652
2667
|
type="number"
|
|
2653
|
-
value="
|
|
2668
|
+
value="10"
|
|
2654
2669
|
/>
|
|
2655
2670
|
</div>
|
|
2656
2671
|
|
|
2657
2672
|
</label>
|
|
2658
2673
|
</div>
|
|
2659
|
-
<
|
|
2674
|
+
<button
|
|
2660
2675
|
className="c18"
|
|
2661
2676
|
color="red"
|
|
2662
2677
|
type="submit"
|
|
2663
|
-
|
|
2664
|
-
|
|
2678
|
+
>
|
|
2679
|
+
Donate £10
|
|
2680
|
+
</button>
|
|
2665
2681
|
</fieldset>
|
|
2666
2682
|
</form>
|
|
2667
2683
|
</div>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comicrelief/component-library",
|
|
3
3
|
"author": "Comic Relief Engineering Team",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.16.0",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"license": "ISC",
|
|
7
7
|
"jest": {
|
|
@@ -24,10 +24,11 @@
|
|
|
24
24
|
"@babel/cli": "^7.14.8",
|
|
25
25
|
"@hookform/resolvers": "^1.3.4",
|
|
26
26
|
"axios": "^0.21.1",
|
|
27
|
+
"ejs": "^3.1.9",
|
|
27
28
|
"jest-styled-components": "^7.0.5",
|
|
28
29
|
"lazysizes": "^5.3.2",
|
|
29
30
|
"lodash": "^4.17.11",
|
|
30
|
-
"moment": "^2.29.
|
|
31
|
+
"moment": "^2.29.4",
|
|
31
32
|
"prop-types": "^15.7.2",
|
|
32
33
|
"react": "^17.0.2",
|
|
33
34
|
"react-canvas-confetti": "^1.3.0",
|
|
@@ -35,12 +36,12 @@
|
|
|
35
36
|
"react-dom": "^17.0.2",
|
|
36
37
|
"react-hook-form": "^6.3.0",
|
|
37
38
|
"react-modal": "^3.14.3",
|
|
38
|
-
"react-responsive": "^9.0.
|
|
39
|
+
"react-responsive": "^9.0.2",
|
|
39
40
|
"react-scripts": "4.0.3",
|
|
40
41
|
"react-spinners": "^0.11.0",
|
|
41
42
|
"react-styleguidist": "^11.1.7",
|
|
42
43
|
"react-test-renderer": "^17.0.2",
|
|
43
|
-
"react-uid": "^2.2
|
|
44
|
+
"react-uid": "^2.3.2",
|
|
44
45
|
"styled-components": "^5.3.1",
|
|
45
46
|
"youtube-player": "^5.5.2",
|
|
46
47
|
"yup": "^0.32.9"
|
|
@@ -73,7 +74,6 @@
|
|
|
73
74
|
]
|
|
74
75
|
},
|
|
75
76
|
"devDependencies": {
|
|
76
|
-
"babel-eslint": "^10.0.2",
|
|
77
77
|
"cross-env": "^7.0.3",
|
|
78
78
|
"cypress": "^8.3.0",
|
|
79
79
|
"eslint": "^7.32.0",
|
|
@@ -82,7 +82,6 @@
|
|
|
82
82
|
"eslint-plugin-jsx-a11y": "^6.3.1",
|
|
83
83
|
"eslint-plugin-react": "^7.24.0",
|
|
84
84
|
"eslint-plugin-react-hooks": "^4.0.5",
|
|
85
|
-
"husky": "^7.0.2",
|
|
86
85
|
"jest": "^26.1.0",
|
|
87
86
|
"npm-run-all": "^4.1.5",
|
|
88
87
|
"prettier": "^2.3.2",
|
|
@@ -31,7 +31,6 @@ const SingleMessageDs = ({
|
|
|
31
31
|
}) => {
|
|
32
32
|
const [isOpen, setIsOpen] = useState(false);
|
|
33
33
|
|
|
34
|
-
// const openModal = () => setIsOpen(true);
|
|
35
34
|
const closeModal = () => setIsOpen(false);
|
|
36
35
|
|
|
37
36
|
const Media = (
|
|
@@ -57,6 +56,7 @@ const SingleMessageDs = ({
|
|
|
57
56
|
tabIndex="-1"
|
|
58
57
|
href={link}
|
|
59
58
|
target={target}
|
|
59
|
+
data-cta-copy={linkLabel}
|
|
60
60
|
{...rest}
|
|
61
61
|
>
|
|
62
62
|
{Media}
|
|
@@ -71,6 +71,7 @@ const SingleMessageDs = ({
|
|
|
71
71
|
tabIndex="-1"
|
|
72
72
|
href={youTubeId}
|
|
73
73
|
target={target}
|
|
74
|
+
data-cta-copy={linkLabel}
|
|
74
75
|
{...rest}
|
|
75
76
|
onClick={e => { setIsOpen(true); e.preventDefault(); }}
|
|
76
77
|
>
|
|
@@ -11,7 +11,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
11
11
|
alt="Background image"
|
|
12
12
|
mobileBackgroundColor="deep_violet_dark"
|
|
13
13
|
desktopOverlayColor="red"
|
|
14
|
-
|
|
14
|
+
submitButtonColor="blue_dark"
|
|
15
15
|
formAlignRight={true}
|
|
16
16
|
imageLow={desktopPictures.imageLow}
|
|
17
17
|
images={desktopPictures.images}
|
|
@@ -35,6 +35,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
35
35
|
|
|
36
36
|
<Donate
|
|
37
37
|
mobileBackgroundColor="blue_dark"
|
|
38
|
+
submitButtonColor="blue_dark"
|
|
38
39
|
desktopOverlayColor="blue_dark"
|
|
39
40
|
formAlignRight={false}
|
|
40
41
|
imageLow={desktopPictures.imageLow}
|
|
@@ -61,6 +62,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
61
62
|
|
|
62
63
|
<Donate
|
|
63
64
|
mobileBackgroundColor="blue_dark"
|
|
65
|
+
submitButtonColor="blue_dark"
|
|
64
66
|
desktopOverlayColor="blue_dark"
|
|
65
67
|
formAlignRight={false}
|
|
66
68
|
imageLow={desktopPictures.imageLow}
|
|
@@ -86,6 +88,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
86
88
|
|
|
87
89
|
<Donate
|
|
88
90
|
mobileBackgroundColor="blue_dark"
|
|
91
|
+
submitButtonColor="blue_dark"
|
|
89
92
|
desktopOverlayColor="blue_dark"
|
|
90
93
|
formAlignRight={false}
|
|
91
94
|
imageLow={desktopPictures.imageLow}
|
|
@@ -209,6 +212,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
209
212
|
<Donate
|
|
210
213
|
alt="Background image"
|
|
211
214
|
mobileBackgroundColor="transparent"
|
|
215
|
+
submitButtonColor="blue_dark"
|
|
212
216
|
desktopOverlayColor="transparent"
|
|
213
217
|
formAlignRight={true}
|
|
214
218
|
imageLow={desktopPictures.imageLow}
|
|
@@ -234,6 +238,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
234
238
|
|
|
235
239
|
<Donate
|
|
236
240
|
mobileBackgroundColor="transparent"
|
|
241
|
+
submitButtonColor="blue_dark"
|
|
237
242
|
formAlignRight={false}
|
|
238
243
|
imageLow={desktopPictures.imageLow}
|
|
239
244
|
images={desktopPictures.images}
|
|
@@ -258,6 +263,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
258
263
|
|
|
259
264
|
<Donate
|
|
260
265
|
mobileBackgroundColor="blue_dark"
|
|
266
|
+
submitButtonColor="blue_dark"
|
|
261
267
|
formAlignRight={false}
|
|
262
268
|
imageLow={desktopPictures.imageLow}
|
|
263
269
|
images={desktopPictures.images}
|
|
@@ -282,6 +288,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
282
288
|
|
|
283
289
|
<Donate
|
|
284
290
|
mobileBackgroundColor="blue_dark"
|
|
291
|
+
submitButtonColor="blue_dark"
|
|
285
292
|
formAlignRight={false}
|
|
286
293
|
imageLow={desktopPictures.imageLow}
|
|
287
294
|
images={desktopPictures.images}
|
|
@@ -305,6 +312,7 @@ import data from './dev-data/data-single';
|
|
|
305
312
|
|
|
306
313
|
<Donate
|
|
307
314
|
desktopOverlayColor="blue_dark"
|
|
315
|
+
submitButtonColor="blue_dark"
|
|
308
316
|
mobileBackgroundColor="blue_dark"
|
|
309
317
|
formAlignRight={false}
|
|
310
318
|
data={data}
|
|
@@ -329,6 +337,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
329
337
|
<Donate
|
|
330
338
|
alt="Background image"
|
|
331
339
|
mobileBackgroundColor="red"
|
|
340
|
+
submitButtonColor="blue_dark"
|
|
332
341
|
desktopOverlayColor="red"
|
|
333
342
|
formAlignRight={true}
|
|
334
343
|
imageLow={desktopPictures.imageLow}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, {
|
|
2
|
+
useState, useRef, useEffect, useCallback
|
|
3
|
+
} from 'react';
|
|
2
4
|
import PropTypes from 'prop-types';
|
|
3
5
|
|
|
4
6
|
import PopUpComponent from './PopUpComponent';
|
|
@@ -40,7 +42,7 @@ const Signup = ({
|
|
|
40
42
|
}) => {
|
|
41
43
|
const [givingType, setGivingType] = useState('single');
|
|
42
44
|
const [errorMsg, setErrorMsg] = useState(false);
|
|
43
|
-
const [amountDonate, setAmountDonate] = useState(
|
|
45
|
+
const [amountDonate, setAmountDonate] = useState(10);
|
|
44
46
|
const [moneyBuyCopy, setMoneyBuyCopy] = useState(true);
|
|
45
47
|
const [popOpen, setPopOpen] = useState(false);
|
|
46
48
|
// In order to keep track of whether the user has ever been shown the popup
|
|
@@ -142,6 +144,53 @@ const Signup = ({
|
|
|
142
144
|
const givingData = givingType === 'single' ? singleGiving : regularGiving;
|
|
143
145
|
const showGivingSelector = singleGiving !== null && regularGiving !== null;
|
|
144
146
|
|
|
147
|
+
// Create ref for amount input
|
|
148
|
+
const amountRef = useRef(null);
|
|
149
|
+
// Create ref for amount button
|
|
150
|
+
const buttonRef = useRef(null);
|
|
151
|
+
|
|
152
|
+
const handleClickOutside = useCallback(event => {
|
|
153
|
+
if (!errorMsg) {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if (buttonRef.current && event.target === buttonRef.current) {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (amountRef.current && !amountRef.current.contains(event.target)) {
|
|
162
|
+
// Check the 2nd moneybuy exists before using it;
|
|
163
|
+
// 'philantrophy' carts have been set up to use a single moneybuy.
|
|
164
|
+
// See ENG-1685 for more details
|
|
165
|
+
const thisAmount = givingData.moneybuys[1]
|
|
166
|
+
? givingData.moneybuys[1].value
|
|
167
|
+
: givingData.moneybuys[0].value;
|
|
168
|
+
|
|
169
|
+
setAmountDonate(parseFloat(thisAmount));
|
|
170
|
+
}
|
|
171
|
+
}, [errorMsg, givingData.moneybuys]);
|
|
172
|
+
|
|
173
|
+
// Listen for click outside custom amount input if there is no value entered.
|
|
174
|
+
useEffect(() => {
|
|
175
|
+
// Bind the event listener
|
|
176
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
177
|
+
return () => {
|
|
178
|
+
// Unbind the event listener on clean up
|
|
179
|
+
document.removeEventListener('mousedown', handleClickOutside);
|
|
180
|
+
};
|
|
181
|
+
}, [errorMsg, handleClickOutside]);
|
|
182
|
+
|
|
183
|
+
// Create function to conditionally render button text
|
|
184
|
+
const renderButtonText = () => {
|
|
185
|
+
if (errorMsg) {
|
|
186
|
+
return 'Donate';
|
|
187
|
+
}
|
|
188
|
+
if (givingType === 'single') {
|
|
189
|
+
return `Donate £${amountFormatter(amountDonate)} now`;
|
|
190
|
+
}
|
|
191
|
+
return `Donate £${amountFormatter(amountDonate)} monthly`;
|
|
192
|
+
};
|
|
193
|
+
|
|
145
194
|
return (
|
|
146
195
|
<FormWrapper>
|
|
147
196
|
{showGivingSelector && (
|
|
@@ -210,6 +259,7 @@ const Signup = ({
|
|
|
210
259
|
placeholder="0.00"
|
|
211
260
|
onChange={e => setAmountDonate(parseFloat(e.target.value))}
|
|
212
261
|
aria-label="Input a different amount"
|
|
262
|
+
ref={amountRef}
|
|
213
263
|
/>
|
|
214
264
|
</FormFieldset>
|
|
215
265
|
{amountDonate >= 1 && !noMoneyBuys && moneyBuyCopy && (
|
|
@@ -227,14 +277,23 @@ const Signup = ({
|
|
|
227
277
|
)}
|
|
228
278
|
|
|
229
279
|
{noMoneyBuys ? (
|
|
230
|
-
<Button
|
|
280
|
+
<Button
|
|
281
|
+
type="submit"
|
|
282
|
+
color={submitButtonColor}
|
|
283
|
+
>
|
|
284
|
+
{errorMsg
|
|
285
|
+
? 'Donate'
|
|
286
|
+
: `Donate £${amountFormatter(amountDonate)}`}
|
|
287
|
+
</Button>
|
|
231
288
|
) : (
|
|
232
289
|
<Button
|
|
233
290
|
type="submit"
|
|
234
|
-
as="input"
|
|
235
|
-
value={givingType === 'single' ? 'Donate now' : 'Donate monthly'}
|
|
236
291
|
color={submitButtonColor}
|
|
237
|
-
|
|
292
|
+
ref={buttonRef}
|
|
293
|
+
>
|
|
294
|
+
{renderButtonText()}
|
|
295
|
+
</Button>
|
|
296
|
+
|
|
238
297
|
)}
|
|
239
298
|
|
|
240
299
|
</OuterFieldset>
|
|
@@ -637,12 +637,13 @@ exports[`"Single Giving, No Money Buys, with overridden manual input value" rend
|
|
|
637
637
|
|
|
638
638
|
</label>
|
|
639
639
|
</div>
|
|
640
|
-
<
|
|
640
|
+
<button
|
|
641
641
|
className="c24"
|
|
642
642
|
color="red"
|
|
643
643
|
type="submit"
|
|
644
|
-
|
|
645
|
-
|
|
644
|
+
>
|
|
645
|
+
Donate £345.67
|
|
646
|
+
</button>
|
|
646
647
|
</fieldset>
|
|
647
648
|
</form>
|
|
648
649
|
</div>
|
|
@@ -955,6 +956,11 @@ exports[`Monthly donation renders correctly 1`] = `
|
|
|
955
956
|
}
|
|
956
957
|
|
|
957
958
|
.c28 {
|
|
959
|
+
line-height: 1.5;
|
|
960
|
+
margin-top: 2rem;
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
.c29 {
|
|
958
964
|
width: 100%;
|
|
959
965
|
margin: 2rem 0 2rem;
|
|
960
966
|
color: #FFFFFF;
|
|
@@ -973,9 +979,9 @@ exports[`Monthly donation renders correctly 1`] = `
|
|
|
973
979
|
appearance: none;
|
|
974
980
|
}
|
|
975
981
|
|
|
976
|
-
.
|
|
977
|
-
.
|
|
978
|
-
.
|
|
982
|
+
.c29:active,
|
|
983
|
+
.c29:focus,
|
|
984
|
+
.c29:hover {
|
|
979
985
|
outline: none;
|
|
980
986
|
background-color: #961D35;
|
|
981
987
|
}
|
|
@@ -1225,7 +1231,7 @@ exports[`Monthly donation renders correctly 1`] = `
|
|
|
1225
1231
|
}
|
|
1226
1232
|
|
|
1227
1233
|
@media (min-width:740px) {
|
|
1228
|
-
.
|
|
1234
|
+
.c29 {
|
|
1229
1235
|
padding: 1rem 2rem;
|
|
1230
1236
|
}
|
|
1231
1237
|
}
|
|
@@ -1478,18 +1484,26 @@ exports[`Monthly donation renders correctly 1`] = `
|
|
|
1478
1484
|
required={false}
|
|
1479
1485
|
step="0.01"
|
|
1480
1486
|
type="number"
|
|
1481
|
-
value="
|
|
1487
|
+
value="10"
|
|
1482
1488
|
/>
|
|
1483
1489
|
</div>
|
|
1484
1490
|
|
|
1485
1491
|
</label>
|
|
1486
1492
|
</div>
|
|
1487
|
-
<
|
|
1493
|
+
<p
|
|
1488
1494
|
className="c28"
|
|
1495
|
+
>
|
|
1496
|
+
<strong>
|
|
1497
|
+
£10.00
|
|
1498
|
+
</strong>
|
|
1499
|
+
</p>
|
|
1500
|
+
<button
|
|
1501
|
+
className="c29"
|
|
1489
1502
|
color="red"
|
|
1490
1503
|
type="submit"
|
|
1491
|
-
|
|
1492
|
-
|
|
1504
|
+
>
|
|
1505
|
+
Donate £10 now
|
|
1506
|
+
</button>
|
|
1493
1507
|
</fieldset>
|
|
1494
1508
|
</form>
|
|
1495
1509
|
</div>
|
|
@@ -1594,11 +1608,11 @@ exports[`Single donation renders correctly 1`] = `
|
|
|
1594
1608
|
font-size: 1.25rem;
|
|
1595
1609
|
}
|
|
1596
1610
|
|
|
1597
|
-
.
|
|
1611
|
+
.c18 {
|
|
1598
1612
|
display: block;
|
|
1599
1613
|
}
|
|
1600
1614
|
|
|
1601
|
-
.
|
|
1615
|
+
.c18 input {
|
|
1602
1616
|
border: none;
|
|
1603
1617
|
background-color: #BECCF9;
|
|
1604
1618
|
color: #000000;
|
|
@@ -1608,23 +1622,30 @@ exports[`Single donation renders correctly 1`] = `
|
|
|
1608
1622
|
border-radius: 10px;
|
|
1609
1623
|
box-shadow: 0px 0px 16px rgba(0,0,0,0.15);
|
|
1610
1624
|
height: auto;
|
|
1625
|
+
background-color: #0565D1;
|
|
1626
|
+
box-shadow: 0px 0px 16px rgba(0,0,0,0.3);
|
|
1627
|
+
color: #FFFFFF;
|
|
1611
1628
|
}
|
|
1612
1629
|
|
|
1613
|
-
.
|
|
1630
|
+
.c18 input:focus {
|
|
1614
1631
|
border: none;
|
|
1615
1632
|
outline: none;
|
|
1616
1633
|
box-shadow: inset 0 0 0 4px #0565D1;
|
|
1617
1634
|
}
|
|
1618
1635
|
|
|
1619
|
-
.
|
|
1636
|
+
.c18 input:active:focus {
|
|
1620
1637
|
box-shadow: 0px 0px 16px rgba(0,0,0,0.3);
|
|
1621
1638
|
}
|
|
1622
1639
|
|
|
1623
|
-
.c18 {
|
|
1640
|
+
.c18 input:focus {
|
|
1641
|
+
box-shadow: 0px 0px 16px rgba(0,0,0,0.3);
|
|
1642
|
+
}
|
|
1643
|
+
|
|
1644
|
+
.c13 {
|
|
1624
1645
|
display: block;
|
|
1625
1646
|
}
|
|
1626
1647
|
|
|
1627
|
-
.
|
|
1648
|
+
.c13 input {
|
|
1628
1649
|
border: none;
|
|
1629
1650
|
background-color: #BECCF9;
|
|
1630
1651
|
color: #000000;
|
|
@@ -1634,22 +1655,15 @@ exports[`Single donation renders correctly 1`] = `
|
|
|
1634
1655
|
border-radius: 10px;
|
|
1635
1656
|
box-shadow: 0px 0px 16px rgba(0,0,0,0.15);
|
|
1636
1657
|
height: auto;
|
|
1637
|
-
background-color: #0565D1;
|
|
1638
|
-
box-shadow: 0px 0px 16px rgba(0,0,0,0.3);
|
|
1639
|
-
color: #FFFFFF;
|
|
1640
1658
|
}
|
|
1641
1659
|
|
|
1642
|
-
.
|
|
1660
|
+
.c13 input:focus {
|
|
1643
1661
|
border: none;
|
|
1644
1662
|
outline: none;
|
|
1645
1663
|
box-shadow: inset 0 0 0 4px #0565D1;
|
|
1646
1664
|
}
|
|
1647
1665
|
|
|
1648
|
-
.
|
|
1649
|
-
box-shadow: 0px 0px 16px rgba(0,0,0,0.3);
|
|
1650
|
-
}
|
|
1651
|
-
|
|
1652
|
-
.c18 input:focus {
|
|
1666
|
+
.c13 input:active:focus {
|
|
1653
1667
|
box-shadow: 0px 0px 16px rgba(0,0,0,0.3);
|
|
1654
1668
|
}
|
|
1655
1669
|
|
|
@@ -1878,14 +1892,14 @@ exports[`Single donation renders correctly 1`] = `
|
|
|
1878
1892
|
}
|
|
1879
1893
|
|
|
1880
1894
|
@media (min-width:740px) {
|
|
1881
|
-
.
|
|
1895
|
+
.c18 input {
|
|
1882
1896
|
font-size: 2rem;
|
|
1883
1897
|
padding: 1.5rem;
|
|
1884
1898
|
}
|
|
1885
1899
|
}
|
|
1886
1900
|
|
|
1887
1901
|
@media (min-width:740px) {
|
|
1888
|
-
.
|
|
1902
|
+
.c13 input {
|
|
1889
1903
|
font-size: 2rem;
|
|
1890
1904
|
padding: 1.5rem;
|
|
1891
1905
|
}
|
|
@@ -2197,12 +2211,13 @@ exports[`Single donation renders correctly 1`] = `
|
|
|
2197
2211
|
</strong>
|
|
2198
2212
|
a support worker to visit 10 isolated young mums with postnatal depression in the UK.
|
|
2199
2213
|
</p>
|
|
2200
|
-
<
|
|
2214
|
+
<button
|
|
2201
2215
|
className="c24"
|
|
2202
2216
|
color="red"
|
|
2203
2217
|
type="submit"
|
|
2204
|
-
|
|
2205
|
-
|
|
2218
|
+
>
|
|
2219
|
+
Donate £20 now
|
|
2220
|
+
</button>
|
|
2206
2221
|
</fieldset>
|
|
2207
2222
|
</form>
|
|
2208
2223
|
</div>
|
|
@@ -2650,18 +2665,19 @@ exports[`Single donation with no Money Buys renders correctly 1`] = `
|
|
|
2650
2665
|
required={false}
|
|
2651
2666
|
step="0.01"
|
|
2652
2667
|
type="number"
|
|
2653
|
-
value="
|
|
2668
|
+
value="10"
|
|
2654
2669
|
/>
|
|
2655
2670
|
</div>
|
|
2656
2671
|
|
|
2657
2672
|
</label>
|
|
2658
2673
|
</div>
|
|
2659
|
-
<
|
|
2674
|
+
<button
|
|
2660
2675
|
className="c18"
|
|
2661
2676
|
color="red"
|
|
2662
2677
|
type="submit"
|
|
2663
|
-
|
|
2664
|
-
|
|
2678
|
+
>
|
|
2679
|
+
Donate £10
|
|
2680
|
+
</button>
|
|
2665
2681
|
</fieldset>
|
|
2666
2682
|
</form>
|
|
2667
2683
|
</div>
|