@comicrelief/component-library 7.17.0 → 7.18.1
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/Header.spec.js +134 -135
- package/dist/components/Atoms/Logo/Logo.js +6 -1
- package/dist/components/Atoms/Logo/assets/CR_LOGO_PRIDE_KEY_RGB.svg +79 -0
- package/dist/components/Atoms/Logo/assets/cr-pride-logo.svg +34 -0
- package/dist/components/Molecules/Logos/Logos.js +10 -0
- package/dist/components/Organisms/Donate/Form/Form.js +18 -17
- package/dist/components/Organisms/Donate/__snapshots__/Donate.test.js.snap +14 -14
- package/dist/components/Organisms/Donate/dev-data/data.js +6 -6
- package/dist/components/Organisms/Header/Header.md +19 -0
- package/dist/components/Organisms/Membership/Form/Form.js +2 -1
- package/dist/components/Organisms/Membership/dev-data/data.js +3 -3
- package/package.json +1 -1
- package/src/components/Atoms/Logo/Logo.js +4 -1
- package/src/components/Atoms/Logo/assets/CR_LOGO_PRIDE_KEY_RGB.svg +79 -0
- package/src/components/Atoms/Logo/assets/cr-pride-logo.svg +34 -0
- package/src/components/Molecules/Logos/Logos.js +8 -0
- package/src/components/Organisms/Donate/Form/Form.js +18 -18
- package/src/components/Organisms/Donate/__snapshots__/Donate.test.js.snap +14 -14
- package/src/components/Organisms/Donate/dev-data/data.js +6 -6
- package/src/components/Organisms/Header/Header.md +19 -0
- package/src/components/Organisms/Membership/Form/Form.js +1 -1
- package/src/components/Organisms/Membership/MoneyBox/MoneyBox.js +1 -1
- package/src/components/Organisms/Membership/dev-data/data.js +3 -3
|
@@ -1,144 +1,143 @@
|
|
|
1
1
|
describe('Header component', () => {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
before(() => {
|
|
3
|
+
// go to header component
|
|
4
|
+
cy.visit('/#header');
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
describe('props and methods section', () => {
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
cy.get('[data-testid="Header-container"] button[name="rsg-usage"]')
|
|
10
|
+
.contains('Props & methods')
|
|
11
|
+
.as('propsBtn');
|
|
12
|
+
|
|
13
|
+
cy.get('@propsBtn')
|
|
14
|
+
.closest('[class^=rsg--tabs]')
|
|
15
|
+
.as('container');
|
|
5
16
|
});
|
|
6
17
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
cy.get('[data-testid="Header-container"] button[name="rsg-usage"]')
|
|
10
|
-
.contains('Props & methods')
|
|
11
|
-
.as('propsBtn');
|
|
12
|
-
|
|
13
|
-
cy.get('@propsBtn')
|
|
14
|
-
.closest('[class^=rsg--tabs]')
|
|
15
|
-
.as('container');
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('is present', () => {
|
|
19
|
-
cy.get('@propsBtn').should('exist');
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
it('does not show table initially', () => {
|
|
23
|
-
cy.get('@container')
|
|
24
|
-
.find('table')
|
|
25
|
-
.should('not.exist');
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
it('shows the table on button click', () => {
|
|
29
|
-
cy.get('@propsBtn').click();
|
|
30
|
-
cy.get('@container')
|
|
31
|
-
.find('table')
|
|
32
|
-
.should('contain', 'Prop name');
|
|
33
|
-
});
|
|
18
|
+
it('is present', () => {
|
|
19
|
+
cy.get('@propsBtn').should('exist');
|
|
34
20
|
});
|
|
35
21
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
.find('[data-preview="Header"]')
|
|
41
|
-
.as('preview');
|
|
42
|
-
|
|
43
|
-
cy.get('@container')
|
|
44
|
-
.find('button')
|
|
45
|
-
.contains('View Code')
|
|
46
|
-
.as('viewCodeBtn');
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
it('renders header preview', () => {
|
|
50
|
-
//Logo
|
|
51
|
-
cy.get('@container')
|
|
52
|
-
.find('[title="Go to Comic Relief homepage"]')
|
|
53
|
-
.should('exist');
|
|
54
|
-
|
|
55
|
-
//fundraising
|
|
56
|
-
cy.viewport('macbook-15');
|
|
57
|
-
cy.reload();
|
|
58
|
-
cy.get('@container')
|
|
59
|
-
.find('nav > ul > li:nth-child(1) a')
|
|
60
|
-
.should('have.attr', 'href', 'https://www.comicrelief.com/fundraising/pay-in-your-money');
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
//Donate
|
|
64
|
-
cy.get('@container')
|
|
65
|
-
.find('header[role="banner"] a[href="/donation"]')
|
|
66
|
-
.should('exist')
|
|
67
|
-
.contains('Donate');
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
it('has view code button', () => {
|
|
71
|
-
cy.get('@viewCodeBtn').should('exist');
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
it('shows code on click', () => {
|
|
75
|
-
cy.get('@viewCodeBtn').click();
|
|
76
|
-
cy.get('@container')
|
|
77
|
-
.find('textarea')
|
|
78
|
-
.should('exist');
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
it('closes code on click', () => {
|
|
82
|
-
cy.get('@viewCodeBtn').click();
|
|
83
|
-
});
|
|
22
|
+
it('does not show table initially', () => {
|
|
23
|
+
cy.get('@container')
|
|
24
|
+
.find('table')
|
|
25
|
+
.should('not.exist');
|
|
84
26
|
});
|
|
85
27
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
.as('preview');
|
|
92
|
-
|
|
93
|
-
cy.get('@container')
|
|
94
|
-
.find('button')
|
|
95
|
-
.contains('View Code')
|
|
96
|
-
.as('viewCodeBtn');
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
it('renders CR Header with search and ESU preview', () => {
|
|
100
|
-
//Logo
|
|
101
|
-
cy.get('@container')
|
|
102
|
-
.find('[title="Go to Comic Relief homepage"]')
|
|
103
|
-
.should('exist');
|
|
104
|
-
|
|
105
|
-
//fundraising
|
|
106
|
-
cy.viewport('iphone-6');
|
|
107
|
-
cy.reload();
|
|
108
|
-
cy.get('@container')
|
|
109
|
-
.find('nav > ul > li:nth-child(1) a')
|
|
110
|
-
.should('have.attr', 'href', '#');
|
|
111
|
-
|
|
112
|
-
//Donate
|
|
113
|
-
cy.get('@container')
|
|
114
|
-
.find('header[role="banner"] a[href="/donation"]')
|
|
115
|
-
.should('exist')
|
|
116
|
-
.contains('Donate');
|
|
117
|
-
|
|
118
|
-
//search
|
|
119
|
-
cy.get('@container')
|
|
120
|
-
.find('header[role="banner"] a[href="/search"]')
|
|
121
|
-
.should('exist');
|
|
122
|
-
|
|
123
|
-
//search
|
|
124
|
-
cy.get('@container')
|
|
125
|
-
.find('[data-test="header-esu-icon"]')
|
|
126
|
-
.should('exist');
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
it('has view code button', () => {
|
|
130
|
-
cy.get('@viewCodeBtn').should('exist');
|
|
131
|
-
});
|
|
132
|
-
|
|
133
|
-
it('shows code on click', () => {
|
|
134
|
-
cy.get('@viewCodeBtn').click();
|
|
135
|
-
cy.get('@container')
|
|
136
|
-
.find('textarea')
|
|
137
|
-
.should('exist');
|
|
138
|
-
});
|
|
139
|
-
|
|
140
|
-
it('closes code on click', () => {
|
|
141
|
-
cy.get('@viewCodeBtn').click();
|
|
142
|
-
});
|
|
28
|
+
it('shows the table on button click', () => {
|
|
29
|
+
cy.get('@propsBtn').click();
|
|
30
|
+
cy.get('@container')
|
|
31
|
+
.find('table')
|
|
32
|
+
.should('contain', 'Prop name');
|
|
143
33
|
});
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
describe('CR Header section', () => {
|
|
37
|
+
beforeEach(() => {
|
|
38
|
+
cy.get('[data-testid="Header-example-1"]')
|
|
39
|
+
.as('container')
|
|
40
|
+
.find('[data-preview="Header"]')
|
|
41
|
+
.as('preview');
|
|
42
|
+
|
|
43
|
+
cy.get('@container')
|
|
44
|
+
.find('button')
|
|
45
|
+
.contains('View Code')
|
|
46
|
+
.as('viewCodeBtn');
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it('renders header preview', () => {
|
|
50
|
+
// Logo
|
|
51
|
+
cy.get('@container')
|
|
52
|
+
.find('[title="Go to Comic Relief homepage"]')
|
|
53
|
+
.should('exist');
|
|
54
|
+
|
|
55
|
+
// fundraising
|
|
56
|
+
cy.viewport('macbook-15');
|
|
57
|
+
cy.reload();
|
|
58
|
+
cy.get('@container')
|
|
59
|
+
.find('nav > ul > li:nth-child(1) a')
|
|
60
|
+
.should('have.attr', 'href', 'https://www.comicrelief.com/fundraising/pay-in-your-money');
|
|
61
|
+
|
|
62
|
+
// Donate
|
|
63
|
+
cy.get('@container')
|
|
64
|
+
.find('header[role="banner"] a[href="/donation"]')
|
|
65
|
+
.should('exist')
|
|
66
|
+
.contains('Donate');
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
it('has view code button', () => {
|
|
70
|
+
cy.get('@viewCodeBtn').should('exist');
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
it('shows code on click', () => {
|
|
74
|
+
cy.get('@viewCodeBtn').click();
|
|
75
|
+
cy.get('@container')
|
|
76
|
+
.find('textarea')
|
|
77
|
+
.should('exist');
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
it('closes code on click', () => {
|
|
81
|
+
cy.get('@viewCodeBtn').click();
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
describe('CR Header with search and ESU section', () => {
|
|
86
|
+
beforeEach(() => {
|
|
87
|
+
cy.get('[data-testid="Header-example-7"]')
|
|
88
|
+
.as('container')
|
|
89
|
+
.find('[data-preview="Header"]')
|
|
90
|
+
.as('preview');
|
|
91
|
+
|
|
92
|
+
cy.get('@container')
|
|
93
|
+
.find('button')
|
|
94
|
+
.contains('View Code')
|
|
95
|
+
.as('viewCodeBtn');
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
it('renders CR Header with search and ESU preview', () => {
|
|
99
|
+
// Logo
|
|
100
|
+
cy.get('@container')
|
|
101
|
+
.find('[title="Go to Comic Relief homepage"]')
|
|
102
|
+
.should('exist');
|
|
103
|
+
|
|
104
|
+
// fundraising
|
|
105
|
+
cy.viewport('iphone-6');
|
|
106
|
+
cy.reload();
|
|
107
|
+
cy.get('@container')
|
|
108
|
+
.find('nav > ul > li:nth-child(1) a')
|
|
109
|
+
.should('have.attr', 'href', '#');
|
|
110
|
+
|
|
111
|
+
// Donate
|
|
112
|
+
cy.get('@container')
|
|
113
|
+
.find('header[role="banner"] a[href="/donation"]')
|
|
114
|
+
.should('exist')
|
|
115
|
+
.contains('Donate');
|
|
116
|
+
|
|
117
|
+
// search
|
|
118
|
+
cy.get('@container')
|
|
119
|
+
.find('header[role="banner"] a[href="/search"]')
|
|
120
|
+
.should('exist');
|
|
121
|
+
|
|
122
|
+
// search
|
|
123
|
+
cy.get('@container')
|
|
124
|
+
.find('[data-test="header-esu-icon"]')
|
|
125
|
+
.should('exist');
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
it('has view code button', () => {
|
|
129
|
+
cy.get('@viewCodeBtn').should('exist');
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
it('shows code on click', () => {
|
|
133
|
+
cy.get('@viewCodeBtn').click();
|
|
134
|
+
cy.get('@container')
|
|
135
|
+
.find('textarea')
|
|
136
|
+
.should('exist');
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
it('closes code on click', () => {
|
|
140
|
+
cy.get('@viewCodeBtn').click();
|
|
141
|
+
});
|
|
142
|
+
});
|
|
144
143
|
});
|
|
@@ -21,6 +21,8 @@ var _srLogo = _interopRequireDefault(require("./assets/sr-logo.svg"));
|
|
|
21
21
|
|
|
22
22
|
var _srGameonLogo = _interopRequireDefault(require("./assets/sr-gameon-logo.svg"));
|
|
23
23
|
|
|
24
|
+
var _CR_LOGO_PRIDE_KEY_RGB = _interopRequireDefault(require("./assets/CR_LOGO_PRIDE_KEY_RGB.svg"));
|
|
25
|
+
|
|
24
26
|
var Image = _styledComponents.default.img.withConfig({
|
|
25
27
|
displayName: "Logo__Image",
|
|
26
28
|
componentId: "sc-18yiye8-0"
|
|
@@ -52,6 +54,9 @@ var themeSwitcher = function themeSwitcher(theme) {
|
|
|
52
54
|
case 'Sport Relief Gameon':
|
|
53
55
|
return _srGameonLogo.default;
|
|
54
56
|
|
|
57
|
+
case 'Pride':
|
|
58
|
+
return _CR_LOGO_PRIDE_KEY_RGB.default;
|
|
59
|
+
|
|
55
60
|
default:
|
|
56
61
|
return _crLogo.default;
|
|
57
62
|
}
|
|
@@ -68,7 +73,7 @@ var Logo = function Logo(_ref2) {
|
|
|
68
73
|
sizeMd: sizeMd
|
|
69
74
|
}, /*#__PURE__*/_react.default.createElement(Image, {
|
|
70
75
|
src: themeSwitcher(campaign),
|
|
71
|
-
alt: campaign === 'Comic Relief' ? 'Comic Relief logo' : 'Sport Relief logo'
|
|
76
|
+
alt: campaign === 'Comic Relief' || campaign === 'Pride' ? 'Comic Relief logo' : 'Sport Relief logo'
|
|
72
77
|
}));
|
|
73
78
|
};
|
|
74
79
|
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 26.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<svg version="1.1" id="Logo_Keyline" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
|
|
4
|
+
y="0px" viewBox="0 0 500 500" style="enable-background:new 0 0 500 500;" xml:space="preserve">
|
|
5
|
+
<style type="text/css">
|
|
6
|
+
.st0{filter:url(#Adobe_OpacityMaskFilter);}
|
|
7
|
+
.st1{fill:#FFFFFF;}
|
|
8
|
+
.st2{mask:url(#SVGID_1_);}
|
|
9
|
+
.st3{fill:#E52631;}
|
|
10
|
+
.st4{fill:#FF9144;}
|
|
11
|
+
.st5{fill:#FFE400;}
|
|
12
|
+
.st6{fill:#00C100;}
|
|
13
|
+
.st7{fill:#001B9E;}
|
|
14
|
+
.st8{fill:#82008D;}
|
|
15
|
+
.st9{fill:#010101;}
|
|
16
|
+
.st10{fill:#673608;}
|
|
17
|
+
.st11{fill:#49D9EF;}
|
|
18
|
+
.st12{fill:#FFABC7;}
|
|
19
|
+
.st13{fill:#FCF7F4;}
|
|
20
|
+
</style>
|
|
21
|
+
<defs>
|
|
22
|
+
<filter id="Adobe_OpacityMaskFilter" filterUnits="userSpaceOnUse" x="-246.25" y="-7.5" width="738.91" height="735.56">
|
|
23
|
+
<feColorMatrix type="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"/>
|
|
24
|
+
</filter>
|
|
25
|
+
</defs>
|
|
26
|
+
<mask maskUnits="userSpaceOnUse" x="-246.25" y="-7.5" width="738.91" height="735.56" id="SVGID_1_">
|
|
27
|
+
<g class="st0">
|
|
28
|
+
<rect x="13.07" y="16.74" class="st1" width="473.86" height="473.86"/>
|
|
29
|
+
<path id="Path" class="st1" d="M467.67,492.21l-435.34,0c-13.53,0-24.54-11.01-24.54-24.54l0-435.34
|
|
30
|
+
c0-13.53,11.01-24.54,24.54-24.55l435.34,0c13.53,0,24.54,11.01,24.54,24.55l0,435.34C492.21,481.2,481.2,492.21,467.67,492.21"/>
|
|
31
|
+
</g>
|
|
32
|
+
</mask>
|
|
33
|
+
<g class="st2">
|
|
34
|
+
<rect x="13.07" y="6.74" class="st3" width="478.3" height="78.98"/>
|
|
35
|
+
<rect x="13.07" y="85.71" class="st4" width="478.3" height="78.98"/>
|
|
36
|
+
<rect x="13.07" y="164.69" class="st5" width="478.3" height="78.98"/>
|
|
37
|
+
<rect x="13.07" y="243.67" class="st6" width="478.3" height="78.98"/>
|
|
38
|
+
<rect x="13.07" y="322.65" class="st7" width="478.3" height="78.98"/>
|
|
39
|
+
<rect x="13.07" y="401.62" class="st8" width="478.3" height="78.98"/>
|
|
40
|
+
|
|
41
|
+
<rect x="-126.71" y="226.55" transform="matrix(0.7119 0.7023 -0.7023 0.7119 247.1254 -79.8056)" class="st9" width="695.08" height="69.51"/>
|
|
42
|
+
|
|
43
|
+
<rect x="-175.52" y="276.04" transform="matrix(0.7119 0.7023 -0.7023 0.7119 267.8141 -31.2694)" class="st10" width="695.08" height="69.51"/>
|
|
44
|
+
|
|
45
|
+
<rect x="-224.34" y="325.52" transform="matrix(0.7119 0.7023 -0.7023 0.7119 288.5028 17.2668)" class="st11" width="695.08" height="69.51"/>
|
|
46
|
+
|
|
47
|
+
<rect x="-273.15" y="375" transform="matrix(0.7119 0.7023 -0.7023 0.7119 309.1915 65.8031)" class="st12" width="695.08" height="69.51"/>
|
|
48
|
+
|
|
49
|
+
<rect x="-321.96" y="424.49" transform="matrix(0.7119 0.7023 -0.7023 0.7119 329.8802 114.3393)" class="st13" width="695.08" height="69.51"/>
|
|
50
|
+
</g>
|
|
51
|
+
<path id="Keyline" class="st1" d="M467.67,497.5H32.33c-7.96,0-15.44-3.11-21.08-8.74c-5.64-5.64-8.74-13.13-8.74-21.09l0-435.34
|
|
52
|
+
c0-7.96,3.11-15.44,8.74-21.08C16.88,5.6,24.37,2.5,32.33,2.5l435.34,0c16.45,0,29.83,13.38,29.83,29.83l0,435.34
|
|
53
|
+
C497.5,484.12,484.12,497.5,467.67,497.5z M467.67,13.06l-435.34,0c-5.13,0-9.97,2.01-13.61,5.65c-3.64,3.64-5.65,8.48-5.65,13.61
|
|
54
|
+
l0,435.34c0,5.14,2.01,9.97,5.65,13.61c3.64,3.64,8.48,5.65,13.61,5.65h435.34c10.62,0,19.26-8.64,19.26-19.26l0-435.34
|
|
55
|
+
C486.93,21.71,478.29,13.07,467.67,13.06z"/>
|
|
56
|
+
<g id="COMIC_RELIEF_-_optical_tweak_1_">
|
|
57
|
+
<path class="st1" d="M94.57,207.4c0,10.32,1.29,16.95,9.21,16.95s9.21-6.63,9.21-16.95v-12.53h26.34v5.34
|
|
58
|
+
c0,27.08-8.66,46.05-35,46.05c-27.08,0-37.58-18.24-37.58-51.58v-15.84c0-33.34,10.5-51.58,37.58-51.58c26.34,0,35,18.97,35,46.05
|
|
59
|
+
v5.34h-26.34v-12.53c0-10.32-1.29-16.95-9.21-16.95s-9.21,6.63-9.21,16.95V207.4z"/>
|
|
60
|
+
<path class="st1" d="M219.57,193.95c0,33.34-10.5,52.31-37.58,52.31c-27.08,0-37.58-18.97-37.58-52.31v-14.37
|
|
61
|
+
c0-33.34,10.5-52.31,37.58-52.31c27.08,0,37.58,18.97,37.58,52.31V193.95z M172.41,207.03c0,10.32,1.66,17.32,9.58,17.32
|
|
62
|
+
c7.92,0,9.58-7,9.58-17.32v-40.53c0-10.32-1.66-17.32-9.58-17.32c-7.92,0-9.58,7-9.58,17.32V207.03z"/>
|
|
63
|
+
<path class="st1" d="M272.34,187.69h0.74l11.05-58.95h34.08v116.05h-25.05v-66.13h-0.74l-12.71,66.13h-16.95l-13.08-66.13h-0.74
|
|
64
|
+
v66.13h-23.76V128.75H260L272.34,187.69z"/>
|
|
65
|
+
<path class="st1" d="M353.84,128.75v116.05h-27.08V128.75H353.84z"/>
|
|
66
|
+
<path class="st1" d="M388.3,207.4c0,10.32,1.29,16.95,9.21,16.95c7.92,0,9.21-6.63,9.21-16.95v-12.53h26.34v5.34
|
|
67
|
+
c0,27.08-8.66,46.05-35,46.05c-27.08,0-37.58-18.24-37.58-51.58v-15.84c0-33.34,10.5-51.58,37.58-51.58c26.34,0,35,18.97,35,46.05
|
|
68
|
+
v5.34h-26.34v-12.53c0-10.32-1.29-16.95-9.21-16.95c-7.92,0-9.21,6.63-9.21,16.95V207.4z"/>
|
|
69
|
+
<path class="st1" d="M113.17,371.28c-1.47-4.42-1.84-11.24-2.58-25.24c-0.55-11.05-3.32-16.76-11.79-16.76h-3.5v42H68.6V255.23
|
|
70
|
+
h33.34c25.97,0,37.58,13.63,37.58,34.26c0,18.24-8.29,27.26-20.08,29.29c12.16,2.76,16.21,11.42,17.13,25.97
|
|
71
|
+
c0.92,15.29,0.74,21.18,3.32,26.53H113.17z M97.88,307.91c10.87,0,15.1-3.5,15.1-15.29c0-10.5-4.24-15.66-15.1-15.66h-2.58v30.95
|
|
72
|
+
H97.88z"/>
|
|
73
|
+
<path class="st1" d="M204.45,371.28h-58.76V255.23h58.76v22.29h-32.24v23.76h23.95v22.11h-23.95v25.6h32.24V371.28z"/>
|
|
74
|
+
<path class="st1" d="M237.82,255.23v93.76h31.31v22.29h-58.39V255.23H237.82z"/>
|
|
75
|
+
<path class="st1" d="M301.28,255.23v116.05H274.2V255.23H301.28z"/>
|
|
76
|
+
<path class="st1" d="M368.39,371.28h-58.76V255.23h58.76v22.29h-32.24v23.76h23.95v22.11h-23.95v25.6h32.24V371.28z"/>
|
|
77
|
+
<path class="st1" d="M374.68,371.28V255.23h56.55v22.29h-29.47v26.89h21.55v21.92h-21.55v44.95H374.68z"/>
|
|
78
|
+
</g>
|
|
79
|
+
</svg>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 23.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
4
|
+
viewBox="0 0 495 495" style="enable-background:new 0 0 495 495;" xml:space="preserve">
|
|
5
|
+
<style type="text/css">
|
|
6
|
+
.st0{fill:#E52631;}
|
|
7
|
+
.st1{fill:#FFFFFF;}
|
|
8
|
+
</style>
|
|
9
|
+
<path class="st0" d="M473.72,495.5H22.28c-11.98,0-21.78-9.8-21.78-21.78V22.28C0.5,10.3,10.3,0.5,22.28,0.5h451.44
|
|
10
|
+
c11.98,0,21.78,9.8,21.78,21.78v451.44C495.5,485.69,485.7,495.5,473.72,495.5z"/>
|
|
11
|
+
<g id="COMIC_RELIEF_-_optical_tweak">
|
|
12
|
+
<path class="st1" d="M85.69,203.52c0,10.77,1.35,17.7,9.62,17.7s9.62-6.92,9.62-17.7v-13.08h27.5v5.58
|
|
13
|
+
c0,28.27-9.04,48.08-36.54,48.08c-28.27,0-39.24-19.04-39.24-53.85v-16.54c0-34.81,10.96-53.85,39.24-53.85
|
|
14
|
+
c27.5,0,36.54,19.81,36.54,48.08v5.58h-27.5v-13.08c0-10.77-1.35-17.7-9.62-17.7s-9.62,6.92-9.62,17.7V203.52z"/>
|
|
15
|
+
<path class="st1" d="M216.21,189.48c0,34.81-10.96,54.62-39.24,54.62c-28.27,0-39.24-19.81-39.24-54.62v-15
|
|
16
|
+
c0-34.81,10.96-54.62,39.24-54.62c28.27,0,39.24,19.81,39.24,54.62V189.48z M166.97,203.13c0,10.77,1.73,18.08,10,18.08
|
|
17
|
+
s10-7.31,10-18.08v-42.31c0-10.77-1.73-18.08-10-18.08s-10,7.31-10,18.08V203.13z"/>
|
|
18
|
+
<path class="st1" d="M271.32,182.94h0.77l11.54-61.55h35.58v121.17h-26.16v-69.05h-0.77l-13.27,69.05h-17.7l-13.66-69.05h-0.77
|
|
19
|
+
v69.05h-24.81V121.39h36.35L271.32,182.94z"/>
|
|
20
|
+
<path class="st1" d="M356.41,121.39v121.17h-28.27V121.39H356.41z"/>
|
|
21
|
+
<path class="st1" d="M392.39,203.52c0,10.77,1.35,17.7,9.62,17.7c8.27,0,9.62-6.92,9.62-17.7v-13.08h27.5v5.58
|
|
22
|
+
c0,28.27-9.04,48.08-36.54,48.08c-28.27,0-39.24-19.04-39.24-53.85v-16.54c0-34.81,10.96-53.85,39.24-53.85
|
|
23
|
+
c27.5,0,36.54,19.81,36.54,48.08v5.58h-27.5v-13.08c0-10.77-1.35-17.7-9.62-17.7c-8.27,0-9.62,6.92-9.62,17.7V203.52z"/>
|
|
24
|
+
<path class="st1" d="M105.12,374.63c-1.54-4.62-1.92-11.73-2.69-26.35c-0.58-11.54-3.46-17.5-12.31-17.5h-3.65v43.85H58.57V253.46
|
|
25
|
+
h34.81c27.12,0,39.24,14.23,39.24,35.77c0,19.04-8.66,28.47-20.97,30.58c12.69,2.88,16.93,11.92,17.89,27.12
|
|
26
|
+
c0.96,15.96,0.77,22.12,3.46,27.7H105.12z M89.16,308.46c11.35,0,15.77-3.65,15.77-15.96c0-10.96-4.42-16.35-15.77-16.35h-2.69
|
|
27
|
+
v32.31H89.16z"/>
|
|
28
|
+
<path class="st1" d="M200.42,374.63h-61.36V253.46h61.36v23.27h-33.66v24.81h25v23.08h-25v26.74h33.66V374.63z"/>
|
|
29
|
+
<path class="st1" d="M235.27,253.46v97.9h32.7v23.27H207V253.46H235.27z"/>
|
|
30
|
+
<path class="st1" d="M301.53,253.46v121.17h-28.27V253.46H301.53z"/>
|
|
31
|
+
<path class="st1" d="M371.6,374.63h-61.36V253.46h61.36v23.27h-33.66v24.81h25v23.08h-25v26.74h33.66V374.63z"/>
|
|
32
|
+
<path class="st1" d="M378.18,374.63V253.46h59.05v23.27h-30.77v28.08h22.5v22.89h-22.5v46.93H378.18z"/>
|
|
33
|
+
</g>
|
|
34
|
+
</svg>
|
|
@@ -43,6 +43,16 @@ var Logos = function Logos(_ref) {
|
|
|
43
43
|
}));
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
if (campaign === 'Pride') {
|
|
47
|
+
return /*#__PURE__*/_react.default.createElement("a", {
|
|
48
|
+
href: "/",
|
|
49
|
+
title: "Go to Comic Relief homepage"
|
|
50
|
+
}, /*#__PURE__*/_react.default.createElement(_Logo.default, {
|
|
51
|
+
rotate: false,
|
|
52
|
+
campaign: "Pride"
|
|
53
|
+
}));
|
|
54
|
+
}
|
|
55
|
+
|
|
46
56
|
return /*#__PURE__*/_react.default.createElement("a", {
|
|
47
57
|
href: "/",
|
|
48
58
|
title: "Go to Comic Relief homepage"
|
|
@@ -82,7 +82,7 @@ var Signup = function Signup(_ref) {
|
|
|
82
82
|
// If a specific 'other amount' has been passed down, use it,
|
|
83
83
|
// otherwise assign based on the associated moneybuys:
|
|
84
84
|
if (otherAmountValue) {
|
|
85
|
-
setAmountDonate(
|
|
85
|
+
setAmountDonate(otherAmountValue);
|
|
86
86
|
} else {
|
|
87
87
|
var _givingData = givingType === 'single' ? singleGiving : regularGiving; // Check the 2nd moneybuy exists before using it;
|
|
88
88
|
// 'philantrophy' carts have been set up to use a single moneybuy.
|
|
@@ -90,7 +90,7 @@ var Signup = function Signup(_ref) {
|
|
|
90
90
|
|
|
91
91
|
|
|
92
92
|
var thisAmount = _givingData.moneybuys[1] ? _givingData.moneybuys[1].value : _givingData.moneybuys[0].value;
|
|
93
|
-
setAmountDonate(
|
|
93
|
+
setAmountDonate(thisAmount);
|
|
94
94
|
}
|
|
95
95
|
}, [givingType, singleGiving, regularGiving, otherAmountValue]);
|
|
96
96
|
(0, _react.useEffect)(function () {
|
|
@@ -101,7 +101,7 @@ var Signup = function Signup(_ref) {
|
|
|
101
101
|
moneyBuyNewDescription = moneyBuy.description;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
return index === 1 && amountDonate ===
|
|
104
|
+
return index === 1 && amountDonate === undefined && (setMoneyBuyCopy(moneyBuy.description), setAmountDonate(moneyBuy.value));
|
|
105
105
|
});
|
|
106
106
|
|
|
107
107
|
if (!(0, _Membership.isAmountValid)(amountDonate)) {
|
|
@@ -132,7 +132,7 @@ var Signup = function Signup(_ref) {
|
|
|
132
132
|
|
|
133
133
|
(0, _react.useEffect)(function () {
|
|
134
134
|
if (otherAmountValue) {
|
|
135
|
-
setAmountDonate(
|
|
135
|
+
setAmountDonate(otherAmountValue);
|
|
136
136
|
}
|
|
137
137
|
}, [otherAmountValue, setAmountDonate]); // Create money buy boxes
|
|
138
138
|
|
|
@@ -156,7 +156,7 @@ var Signup = function Signup(_ref) {
|
|
|
156
156
|
// 'philantrophy' carts have been set up to use a single moneybuy.
|
|
157
157
|
// See ENG-1685 for more details
|
|
158
158
|
var thisAmount = givingData.moneybuys[1] ? givingData.moneybuys[1].value : givingData.moneybuys[0].value;
|
|
159
|
-
setAmountDonate(
|
|
159
|
+
setAmountDonate(thisAmount);
|
|
160
160
|
}
|
|
161
161
|
}, [errorMsg, givingData.moneybuys]); // Listen for click outside custom amount input if there is no value entered.
|
|
162
162
|
|
|
@@ -175,10 +175,10 @@ var Signup = function Signup(_ref) {
|
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
if (givingType === 'single') {
|
|
178
|
-
return "Donate \xA3".concat(
|
|
178
|
+
return "Donate \xA3".concat(amountDonate, " now");
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
return "Donate \xA3".concat(
|
|
181
|
+
return "Donate \xA3".concat(amountDonate, " monthly");
|
|
182
182
|
};
|
|
183
183
|
|
|
184
184
|
return /*#__PURE__*/_react.default.createElement(_Donate.FormWrapper, null, showGivingSelector && /*#__PURE__*/_react.default.createElement(_GivingSelector.default, {
|
|
@@ -203,10 +203,10 @@ var Signup = function Signup(_ref) {
|
|
|
203
203
|
var value = _ref2.value;
|
|
204
204
|
return /*#__PURE__*/_react.default.createElement(_MoneyBuy.default, {
|
|
205
205
|
isSelected: amountDonate === value,
|
|
206
|
-
amount:
|
|
206
|
+
amount: value.toString(),
|
|
207
207
|
description: "\xA3".concat((0, _Membership.amountFormatter)(value)),
|
|
208
208
|
setOtherAmount: function setOtherAmount() {
|
|
209
|
-
return setAmountDonate(
|
|
209
|
+
return setAmountDonate(value);
|
|
210
210
|
},
|
|
211
211
|
key: value,
|
|
212
212
|
name: "".concat(mbshipID, "--moneyBuy").concat(index + 1),
|
|
@@ -218,7 +218,7 @@ var Signup = function Signup(_ref) {
|
|
|
218
218
|
}, "Other amount"), /*#__PURE__*/_react.default.createElement(_Donate.AmountField, Object.assign({
|
|
219
219
|
step: "0.01",
|
|
220
220
|
name: "membership_amount",
|
|
221
|
-
type: "
|
|
221
|
+
type: "string",
|
|
222
222
|
inputBorderColor: (0, _Membership.isAmountValid)(amountDonate) === false,
|
|
223
223
|
label: "\xA3",
|
|
224
224
|
errorMsg: "",
|
|
@@ -227,23 +227,24 @@ var Signup = function Signup(_ref) {
|
|
|
227
227
|
}, rest, {
|
|
228
228
|
max: "25000",
|
|
229
229
|
min: "1",
|
|
230
|
-
value:
|
|
231
|
-
pattern: "[^[0-9]+([,.][0-9]+)?$]"
|
|
230
|
+
value: amountDonate,
|
|
231
|
+
pattern: "[^[0-9]+([,.][0-9]+)?$]" // this only applies on submit
|
|
232
|
+
,
|
|
232
233
|
placeholder: "0.00",
|
|
233
234
|
onChange: function onChange(e) {
|
|
234
|
-
return setAmountDonate(
|
|
235
|
+
return setAmountDonate(e.target.value.trim());
|
|
235
236
|
},
|
|
236
237
|
"aria-label": "Input a different amount",
|
|
237
238
|
ref: amountRef
|
|
238
239
|
}))), amountDonate >= 1 && !noMoneyBuys && moneyBuyCopy && /*#__PURE__*/_react.default.createElement(_Donate.Copy, {
|
|
239
240
|
as: "p"
|
|
240
|
-
}, /*#__PURE__*/_react.default.createElement("strong", null, "\xA3".concat(amountDonate
|
|
241
|
+
}, /*#__PURE__*/_react.default.createElement("strong", null, "\xA3".concat(amountDonate, " ")), moneyBuyCopy), errorMsg && /*#__PURE__*/_react.default.createElement(_Donate.Error, {
|
|
241
242
|
className: "error--amount",
|
|
242
243
|
tag: "p"
|
|
243
244
|
}, "Please enter an amount between \xA31 and \xA325000 and up to 2 decimal places"), noMoneyBuys ? /*#__PURE__*/_react.default.createElement(_Donate.Button, {
|
|
244
245
|
type: "submit",
|
|
245
246
|
color: submitButtonColor
|
|
246
|
-
}, errorMsg ? 'Donate' : "Donate \xA3".concat(
|
|
247
|
+
}, errorMsg ? 'Donate' : "Donate \xA3".concat(amountDonate)) : /*#__PURE__*/_react.default.createElement(_Donate.Button, {
|
|
247
248
|
type: "submit",
|
|
248
249
|
color: submitButtonColor,
|
|
249
250
|
ref: buttonRef
|
|
@@ -252,8 +253,8 @@ var Signup = function Signup(_ref) {
|
|
|
252
253
|
|
|
253
254
|
Signup.defaultProps = {
|
|
254
255
|
noMoneyBuys: false,
|
|
255
|
-
|
|
256
|
-
|
|
256
|
+
otherAmountValue: null,
|
|
257
|
+
data: {}
|
|
257
258
|
};
|
|
258
259
|
var _default = Signup;
|
|
259
260
|
exports.default = _default;
|
|
@@ -628,8 +628,8 @@ exports[`"Single Giving, No Money Buys, with overridden manual input value" rend
|
|
|
628
628
|
placeholder="0.00"
|
|
629
629
|
required={false}
|
|
630
630
|
step="0.01"
|
|
631
|
-
type="
|
|
632
|
-
value=
|
|
631
|
+
type="string"
|
|
632
|
+
value={345.67}
|
|
633
633
|
/>
|
|
634
634
|
</div>
|
|
635
635
|
|
|
@@ -1358,7 +1358,7 @@ exports[`Monthly donation renders correctly 1`] = `
|
|
|
1358
1358
|
|
|
1359
1359
|
<input
|
|
1360
1360
|
aria-describedby="mship-1--moneyBuy-box1"
|
|
1361
|
-
aria-label="£
|
|
1361
|
+
aria-label="£12.10"
|
|
1362
1362
|
className="c23"
|
|
1363
1363
|
id="mship-1--moneyBuy-box1"
|
|
1364
1364
|
name="mship-1--moneyBuy1"
|
|
@@ -1366,7 +1366,7 @@ exports[`Monthly donation renders correctly 1`] = `
|
|
|
1366
1366
|
placeholder=""
|
|
1367
1367
|
required={false}
|
|
1368
1368
|
type="button"
|
|
1369
|
-
value="£
|
|
1369
|
+
value="£ 12.10"
|
|
1370
1370
|
/>
|
|
1371
1371
|
</div>
|
|
1372
1372
|
|
|
@@ -1391,7 +1391,7 @@ exports[`Monthly donation renders correctly 1`] = `
|
|
|
1391
1391
|
|
|
1392
1392
|
<input
|
|
1393
1393
|
aria-describedby="mship-1--moneyBuy-box2"
|
|
1394
|
-
aria-label="£20"
|
|
1394
|
+
aria-label="£20.00"
|
|
1395
1395
|
className="c23"
|
|
1396
1396
|
id="mship-1--moneyBuy-box2"
|
|
1397
1397
|
name="mship-1--moneyBuy2"
|
|
@@ -1424,7 +1424,7 @@ exports[`Monthly donation renders correctly 1`] = `
|
|
|
1424
1424
|
|
|
1425
1425
|
<input
|
|
1426
1426
|
aria-describedby="mship-1--moneyBuy-box3"
|
|
1427
|
-
aria-label="£30"
|
|
1427
|
+
aria-label="£30.00"
|
|
1428
1428
|
className="c23"
|
|
1429
1429
|
id="mship-1--moneyBuy-box3"
|
|
1430
1430
|
name="mship-1--moneyBuy3"
|
|
@@ -1479,8 +1479,8 @@ exports[`Monthly donation renders correctly 1`] = `
|
|
|
1479
1479
|
placeholder="0.00"
|
|
1480
1480
|
required={false}
|
|
1481
1481
|
step="0.01"
|
|
1482
|
-
type="
|
|
1483
|
-
value=
|
|
1482
|
+
type="string"
|
|
1483
|
+
value={10}
|
|
1484
1484
|
/>
|
|
1485
1485
|
</div>
|
|
1486
1486
|
|
|
@@ -1490,7 +1490,7 @@ exports[`Monthly donation renders correctly 1`] = `
|
|
|
1490
1490
|
className="c28"
|
|
1491
1491
|
>
|
|
1492
1492
|
<strong>
|
|
1493
|
-
£10
|
|
1493
|
+
£10
|
|
1494
1494
|
</strong>
|
|
1495
1495
|
</p>
|
|
1496
1496
|
<button
|
|
@@ -2192,8 +2192,8 @@ exports[`Single donation renders correctly 1`] = `
|
|
|
2192
2192
|
placeholder="0.00"
|
|
2193
2193
|
required={false}
|
|
2194
2194
|
step="0.01"
|
|
2195
|
-
type="
|
|
2196
|
-
value=
|
|
2195
|
+
type="string"
|
|
2196
|
+
value={20}
|
|
2197
2197
|
/>
|
|
2198
2198
|
</div>
|
|
2199
2199
|
|
|
@@ -2203,7 +2203,7 @@ exports[`Single donation renders correctly 1`] = `
|
|
|
2203
2203
|
className="c23"
|
|
2204
2204
|
>
|
|
2205
2205
|
<strong>
|
|
2206
|
-
£20
|
|
2206
|
+
£20
|
|
2207
2207
|
</strong>
|
|
2208
2208
|
a support worker to visit 10 isolated young mums with postnatal depression in the UK.
|
|
2209
2209
|
</p>
|
|
@@ -2660,8 +2660,8 @@ exports[`Single donation with no Money Buys renders correctly 1`] = `
|
|
|
2660
2660
|
placeholder="0.00"
|
|
2661
2661
|
required={false}
|
|
2662
2662
|
step="0.01"
|
|
2663
|
-
type="
|
|
2664
|
-
value=
|
|
2663
|
+
type="string"
|
|
2664
|
+
value={10}
|
|
2665
2665
|
/>
|
|
2666
2666
|
</div>
|
|
2667
2667
|
|
|
@@ -9,25 +9,25 @@ var _default = {
|
|
|
9
9
|
singleGiving: {
|
|
10
10
|
moneybuys: [{
|
|
11
11
|
description: 'a pregnant woman in Uganda to have access to a birth kit so she can have a clean, safe delivery.',
|
|
12
|
-
value: 10
|
|
12
|
+
value: '12.10'
|
|
13
13
|
}, {
|
|
14
14
|
description: 'a support worker to visit 10 isolated young mums with postnatal depression in the UK.',
|
|
15
|
-
value: 20
|
|
15
|
+
value: '20'
|
|
16
16
|
}, {
|
|
17
17
|
description: 'clothes for a child who has had to leave their possessions behind while escaping domestic abuse.',
|
|
18
|
-
value: 30
|
|
18
|
+
value: '30'
|
|
19
19
|
}]
|
|
20
20
|
},
|
|
21
21
|
regularGiving: {
|
|
22
22
|
moneybuys: [{
|
|
23
23
|
description: 'a regular supply of toiletries for someone living in a refugee camp in Serbia.',
|
|
24
|
-
value: 5
|
|
24
|
+
value: '5.50'
|
|
25
25
|
}, {
|
|
26
26
|
description: 'a potentially lifesaving call for a man at risk of suicide in the UK.',
|
|
27
|
-
value: 10
|
|
27
|
+
value: '10'
|
|
28
28
|
}, {
|
|
29
29
|
description: 'the distribution of enough surplus food for a school breakfast club to feed 80 children.',
|
|
30
|
-
value: 20
|
|
30
|
+
value: '20'
|
|
31
31
|
}]
|
|
32
32
|
}
|
|
33
33
|
};
|
|
@@ -36,6 +36,25 @@ import Link from '../../Atoms/Link/Link';
|
|
|
36
36
|
/>;
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
+
# Pride header
|
|
40
|
+
|
|
41
|
+
```js
|
|
42
|
+
import data from './data/data';
|
|
43
|
+
import Link from '../../Atoms/Link/Link';
|
|
44
|
+
|
|
45
|
+
<Header
|
|
46
|
+
navItems={data}
|
|
47
|
+
campaign="Pride"
|
|
48
|
+
metaIcons={
|
|
49
|
+
<>
|
|
50
|
+
<Link color="green" type="button" href="/donation">
|
|
51
|
+
Donate
|
|
52
|
+
</Link>
|
|
53
|
+
</>
|
|
54
|
+
}
|
|
55
|
+
/>;
|
|
56
|
+
```
|
|
57
|
+
|
|
39
58
|
# Comic Relief header with Search
|
|
40
59
|
|
|
41
60
|
```js
|
|
@@ -197,7 +197,8 @@ var Signup = function Signup(_ref) {
|
|
|
197
197
|
max: "25000",
|
|
198
198
|
min: "1",
|
|
199
199
|
value: userInput,
|
|
200
|
-
pattern: "[^[0-9]+([,.][0-9]+)?$]"
|
|
200
|
+
pattern: "[^[0-9]+([,.][0-9]+)?$]" // this only applies on submit
|
|
201
|
+
,
|
|
201
202
|
placeholder: "0.00",
|
|
202
203
|
onChange: function onChange(e) {
|
|
203
204
|
return handleChange(e.target.value, otherDescription);
|
|
@@ -9,13 +9,13 @@ var _default = {
|
|
|
9
9
|
regularGiving: {
|
|
10
10
|
moneybuys: [{
|
|
11
11
|
description: 'a regular supply of toiletries for someone living in a refugee camp in Serbia.',
|
|
12
|
-
value: 5
|
|
12
|
+
value: '5'
|
|
13
13
|
}, {
|
|
14
14
|
description: 'a potentially lifesaving call for a man at risk of suicide in the UK.',
|
|
15
|
-
value: 10
|
|
15
|
+
value: '10'
|
|
16
16
|
}, {
|
|
17
17
|
description: 'the distribution of enough surplus food for a school breakfast club to feed 80 children.',
|
|
18
|
-
value: 20
|
|
18
|
+
value: '20'
|
|
19
19
|
}]
|
|
20
20
|
}
|
|
21
21
|
};
|
package/package.json
CHANGED
|
@@ -7,6 +7,7 @@ import spacing from '../../../theme/shared/spacing';
|
|
|
7
7
|
import crLogo from './assets/cr-logo.svg';
|
|
8
8
|
import srLogo from './assets/sr-logo.svg';
|
|
9
9
|
import srLogoGameOn from './assets/sr-gameon-logo.svg';
|
|
10
|
+
import crLogoPride from './assets/CR_LOGO_PRIDE_KEY_RGB.svg';
|
|
10
11
|
|
|
11
12
|
const Image = styled.img`
|
|
12
13
|
object-fit: cover;
|
|
@@ -37,6 +38,8 @@ const themeSwitcher = theme => {
|
|
|
37
38
|
return srLogo;
|
|
38
39
|
case 'Sport Relief Gameon':
|
|
39
40
|
return srLogoGameOn;
|
|
41
|
+
case 'Pride':
|
|
42
|
+
return crLogoPride;
|
|
40
43
|
default:
|
|
41
44
|
return crLogo;
|
|
42
45
|
}
|
|
@@ -49,7 +52,7 @@ const Logo = ({
|
|
|
49
52
|
<Image
|
|
50
53
|
src={themeSwitcher(campaign)}
|
|
51
54
|
alt={
|
|
52
|
-
campaign === 'Comic Relief'
|
|
55
|
+
campaign === 'Comic Relief' || campaign === 'Pride'
|
|
53
56
|
? 'Comic Relief logo'
|
|
54
57
|
: 'Sport Relief logo'
|
|
55
58
|
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 26.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<svg version="1.1" id="Logo_Keyline" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
|
|
4
|
+
y="0px" viewBox="0 0 500 500" style="enable-background:new 0 0 500 500;" xml:space="preserve">
|
|
5
|
+
<style type="text/css">
|
|
6
|
+
.st0{filter:url(#Adobe_OpacityMaskFilter);}
|
|
7
|
+
.st1{fill:#FFFFFF;}
|
|
8
|
+
.st2{mask:url(#SVGID_1_);}
|
|
9
|
+
.st3{fill:#E52631;}
|
|
10
|
+
.st4{fill:#FF9144;}
|
|
11
|
+
.st5{fill:#FFE400;}
|
|
12
|
+
.st6{fill:#00C100;}
|
|
13
|
+
.st7{fill:#001B9E;}
|
|
14
|
+
.st8{fill:#82008D;}
|
|
15
|
+
.st9{fill:#010101;}
|
|
16
|
+
.st10{fill:#673608;}
|
|
17
|
+
.st11{fill:#49D9EF;}
|
|
18
|
+
.st12{fill:#FFABC7;}
|
|
19
|
+
.st13{fill:#FCF7F4;}
|
|
20
|
+
</style>
|
|
21
|
+
<defs>
|
|
22
|
+
<filter id="Adobe_OpacityMaskFilter" filterUnits="userSpaceOnUse" x="-246.25" y="-7.5" width="738.91" height="735.56">
|
|
23
|
+
<feColorMatrix type="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"/>
|
|
24
|
+
</filter>
|
|
25
|
+
</defs>
|
|
26
|
+
<mask maskUnits="userSpaceOnUse" x="-246.25" y="-7.5" width="738.91" height="735.56" id="SVGID_1_">
|
|
27
|
+
<g class="st0">
|
|
28
|
+
<rect x="13.07" y="16.74" class="st1" width="473.86" height="473.86"/>
|
|
29
|
+
<path id="Path" class="st1" d="M467.67,492.21l-435.34,0c-13.53,0-24.54-11.01-24.54-24.54l0-435.34
|
|
30
|
+
c0-13.53,11.01-24.54,24.54-24.55l435.34,0c13.53,0,24.54,11.01,24.54,24.55l0,435.34C492.21,481.2,481.2,492.21,467.67,492.21"/>
|
|
31
|
+
</g>
|
|
32
|
+
</mask>
|
|
33
|
+
<g class="st2">
|
|
34
|
+
<rect x="13.07" y="6.74" class="st3" width="478.3" height="78.98"/>
|
|
35
|
+
<rect x="13.07" y="85.71" class="st4" width="478.3" height="78.98"/>
|
|
36
|
+
<rect x="13.07" y="164.69" class="st5" width="478.3" height="78.98"/>
|
|
37
|
+
<rect x="13.07" y="243.67" class="st6" width="478.3" height="78.98"/>
|
|
38
|
+
<rect x="13.07" y="322.65" class="st7" width="478.3" height="78.98"/>
|
|
39
|
+
<rect x="13.07" y="401.62" class="st8" width="478.3" height="78.98"/>
|
|
40
|
+
|
|
41
|
+
<rect x="-126.71" y="226.55" transform="matrix(0.7119 0.7023 -0.7023 0.7119 247.1254 -79.8056)" class="st9" width="695.08" height="69.51"/>
|
|
42
|
+
|
|
43
|
+
<rect x="-175.52" y="276.04" transform="matrix(0.7119 0.7023 -0.7023 0.7119 267.8141 -31.2694)" class="st10" width="695.08" height="69.51"/>
|
|
44
|
+
|
|
45
|
+
<rect x="-224.34" y="325.52" transform="matrix(0.7119 0.7023 -0.7023 0.7119 288.5028 17.2668)" class="st11" width="695.08" height="69.51"/>
|
|
46
|
+
|
|
47
|
+
<rect x="-273.15" y="375" transform="matrix(0.7119 0.7023 -0.7023 0.7119 309.1915 65.8031)" class="st12" width="695.08" height="69.51"/>
|
|
48
|
+
|
|
49
|
+
<rect x="-321.96" y="424.49" transform="matrix(0.7119 0.7023 -0.7023 0.7119 329.8802 114.3393)" class="st13" width="695.08" height="69.51"/>
|
|
50
|
+
</g>
|
|
51
|
+
<path id="Keyline" class="st1" d="M467.67,497.5H32.33c-7.96,0-15.44-3.11-21.08-8.74c-5.64-5.64-8.74-13.13-8.74-21.09l0-435.34
|
|
52
|
+
c0-7.96,3.11-15.44,8.74-21.08C16.88,5.6,24.37,2.5,32.33,2.5l435.34,0c16.45,0,29.83,13.38,29.83,29.83l0,435.34
|
|
53
|
+
C497.5,484.12,484.12,497.5,467.67,497.5z M467.67,13.06l-435.34,0c-5.13,0-9.97,2.01-13.61,5.65c-3.64,3.64-5.65,8.48-5.65,13.61
|
|
54
|
+
l0,435.34c0,5.14,2.01,9.97,5.65,13.61c3.64,3.64,8.48,5.65,13.61,5.65h435.34c10.62,0,19.26-8.64,19.26-19.26l0-435.34
|
|
55
|
+
C486.93,21.71,478.29,13.07,467.67,13.06z"/>
|
|
56
|
+
<g id="COMIC_RELIEF_-_optical_tweak_1_">
|
|
57
|
+
<path class="st1" d="M94.57,207.4c0,10.32,1.29,16.95,9.21,16.95s9.21-6.63,9.21-16.95v-12.53h26.34v5.34
|
|
58
|
+
c0,27.08-8.66,46.05-35,46.05c-27.08,0-37.58-18.24-37.58-51.58v-15.84c0-33.34,10.5-51.58,37.58-51.58c26.34,0,35,18.97,35,46.05
|
|
59
|
+
v5.34h-26.34v-12.53c0-10.32-1.29-16.95-9.21-16.95s-9.21,6.63-9.21,16.95V207.4z"/>
|
|
60
|
+
<path class="st1" d="M219.57,193.95c0,33.34-10.5,52.31-37.58,52.31c-27.08,0-37.58-18.97-37.58-52.31v-14.37
|
|
61
|
+
c0-33.34,10.5-52.31,37.58-52.31c27.08,0,37.58,18.97,37.58,52.31V193.95z M172.41,207.03c0,10.32,1.66,17.32,9.58,17.32
|
|
62
|
+
c7.92,0,9.58-7,9.58-17.32v-40.53c0-10.32-1.66-17.32-9.58-17.32c-7.92,0-9.58,7-9.58,17.32V207.03z"/>
|
|
63
|
+
<path class="st1" d="M272.34,187.69h0.74l11.05-58.95h34.08v116.05h-25.05v-66.13h-0.74l-12.71,66.13h-16.95l-13.08-66.13h-0.74
|
|
64
|
+
v66.13h-23.76V128.75H260L272.34,187.69z"/>
|
|
65
|
+
<path class="st1" d="M353.84,128.75v116.05h-27.08V128.75H353.84z"/>
|
|
66
|
+
<path class="st1" d="M388.3,207.4c0,10.32,1.29,16.95,9.21,16.95c7.92,0,9.21-6.63,9.21-16.95v-12.53h26.34v5.34
|
|
67
|
+
c0,27.08-8.66,46.05-35,46.05c-27.08,0-37.58-18.24-37.58-51.58v-15.84c0-33.34,10.5-51.58,37.58-51.58c26.34,0,35,18.97,35,46.05
|
|
68
|
+
v5.34h-26.34v-12.53c0-10.32-1.29-16.95-9.21-16.95c-7.92,0-9.21,6.63-9.21,16.95V207.4z"/>
|
|
69
|
+
<path class="st1" d="M113.17,371.28c-1.47-4.42-1.84-11.24-2.58-25.24c-0.55-11.05-3.32-16.76-11.79-16.76h-3.5v42H68.6V255.23
|
|
70
|
+
h33.34c25.97,0,37.58,13.63,37.58,34.26c0,18.24-8.29,27.26-20.08,29.29c12.16,2.76,16.21,11.42,17.13,25.97
|
|
71
|
+
c0.92,15.29,0.74,21.18,3.32,26.53H113.17z M97.88,307.91c10.87,0,15.1-3.5,15.1-15.29c0-10.5-4.24-15.66-15.1-15.66h-2.58v30.95
|
|
72
|
+
H97.88z"/>
|
|
73
|
+
<path class="st1" d="M204.45,371.28h-58.76V255.23h58.76v22.29h-32.24v23.76h23.95v22.11h-23.95v25.6h32.24V371.28z"/>
|
|
74
|
+
<path class="st1" d="M237.82,255.23v93.76h31.31v22.29h-58.39V255.23H237.82z"/>
|
|
75
|
+
<path class="st1" d="M301.28,255.23v116.05H274.2V255.23H301.28z"/>
|
|
76
|
+
<path class="st1" d="M368.39,371.28h-58.76V255.23h58.76v22.29h-32.24v23.76h23.95v22.11h-23.95v25.6h32.24V371.28z"/>
|
|
77
|
+
<path class="st1" d="M374.68,371.28V255.23h56.55v22.29h-29.47v26.89h21.55v21.92h-21.55v44.95H374.68z"/>
|
|
78
|
+
</g>
|
|
79
|
+
</svg>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 23.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
4
|
+
viewBox="0 0 495 495" style="enable-background:new 0 0 495 495;" xml:space="preserve">
|
|
5
|
+
<style type="text/css">
|
|
6
|
+
.st0{fill:#E52631;}
|
|
7
|
+
.st1{fill:#FFFFFF;}
|
|
8
|
+
</style>
|
|
9
|
+
<path class="st0" d="M473.72,495.5H22.28c-11.98,0-21.78-9.8-21.78-21.78V22.28C0.5,10.3,10.3,0.5,22.28,0.5h451.44
|
|
10
|
+
c11.98,0,21.78,9.8,21.78,21.78v451.44C495.5,485.69,485.7,495.5,473.72,495.5z"/>
|
|
11
|
+
<g id="COMIC_RELIEF_-_optical_tweak">
|
|
12
|
+
<path class="st1" d="M85.69,203.52c0,10.77,1.35,17.7,9.62,17.7s9.62-6.92,9.62-17.7v-13.08h27.5v5.58
|
|
13
|
+
c0,28.27-9.04,48.08-36.54,48.08c-28.27,0-39.24-19.04-39.24-53.85v-16.54c0-34.81,10.96-53.85,39.24-53.85
|
|
14
|
+
c27.5,0,36.54,19.81,36.54,48.08v5.58h-27.5v-13.08c0-10.77-1.35-17.7-9.62-17.7s-9.62,6.92-9.62,17.7V203.52z"/>
|
|
15
|
+
<path class="st1" d="M216.21,189.48c0,34.81-10.96,54.62-39.24,54.62c-28.27,0-39.24-19.81-39.24-54.62v-15
|
|
16
|
+
c0-34.81,10.96-54.62,39.24-54.62c28.27,0,39.24,19.81,39.24,54.62V189.48z M166.97,203.13c0,10.77,1.73,18.08,10,18.08
|
|
17
|
+
s10-7.31,10-18.08v-42.31c0-10.77-1.73-18.08-10-18.08s-10,7.31-10,18.08V203.13z"/>
|
|
18
|
+
<path class="st1" d="M271.32,182.94h0.77l11.54-61.55h35.58v121.17h-26.16v-69.05h-0.77l-13.27,69.05h-17.7l-13.66-69.05h-0.77
|
|
19
|
+
v69.05h-24.81V121.39h36.35L271.32,182.94z"/>
|
|
20
|
+
<path class="st1" d="M356.41,121.39v121.17h-28.27V121.39H356.41z"/>
|
|
21
|
+
<path class="st1" d="M392.39,203.52c0,10.77,1.35,17.7,9.62,17.7c8.27,0,9.62-6.92,9.62-17.7v-13.08h27.5v5.58
|
|
22
|
+
c0,28.27-9.04,48.08-36.54,48.08c-28.27,0-39.24-19.04-39.24-53.85v-16.54c0-34.81,10.96-53.85,39.24-53.85
|
|
23
|
+
c27.5,0,36.54,19.81,36.54,48.08v5.58h-27.5v-13.08c0-10.77-1.35-17.7-9.62-17.7c-8.27,0-9.62,6.92-9.62,17.7V203.52z"/>
|
|
24
|
+
<path class="st1" d="M105.12,374.63c-1.54-4.62-1.92-11.73-2.69-26.35c-0.58-11.54-3.46-17.5-12.31-17.5h-3.65v43.85H58.57V253.46
|
|
25
|
+
h34.81c27.12,0,39.24,14.23,39.24,35.77c0,19.04-8.66,28.47-20.97,30.58c12.69,2.88,16.93,11.92,17.89,27.12
|
|
26
|
+
c0.96,15.96,0.77,22.12,3.46,27.7H105.12z M89.16,308.46c11.35,0,15.77-3.65,15.77-15.96c0-10.96-4.42-16.35-15.77-16.35h-2.69
|
|
27
|
+
v32.31H89.16z"/>
|
|
28
|
+
<path class="st1" d="M200.42,374.63h-61.36V253.46h61.36v23.27h-33.66v24.81h25v23.08h-25v26.74h33.66V374.63z"/>
|
|
29
|
+
<path class="st1" d="M235.27,253.46v97.9h32.7v23.27H207V253.46H235.27z"/>
|
|
30
|
+
<path class="st1" d="M301.53,253.46v121.17h-28.27V253.46H301.53z"/>
|
|
31
|
+
<path class="st1" d="M371.6,374.63h-61.36V253.46h61.36v23.27h-33.66v24.81h25v23.08h-25v26.74h33.66V374.63z"/>
|
|
32
|
+
<path class="st1" d="M378.18,374.63V253.46h59.05v23.27h-30.77v28.08h22.5v22.89h-22.5v46.93H378.18z"/>
|
|
33
|
+
</g>
|
|
34
|
+
</svg>
|
|
@@ -25,6 +25,14 @@ const Logos = ({ campaign }) => {
|
|
|
25
25
|
);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
if (campaign === 'Pride') {
|
|
29
|
+
return (
|
|
30
|
+
<a href="/" title="Go to Comic Relief homepage">
|
|
31
|
+
<Logo rotate={false} campaign="Pride" />
|
|
32
|
+
</a>
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
28
36
|
return (
|
|
29
37
|
<a href="/" title="Go to Comic Relief homepage">
|
|
30
38
|
<Logo rotate={false} campaign="Comic Relief" />
|
|
@@ -52,7 +52,7 @@ const Signup = ({
|
|
|
52
52
|
// If a specific 'other amount' has been passed down, use it,
|
|
53
53
|
// otherwise assign based on the associated moneybuys:
|
|
54
54
|
if (otherAmountValue) {
|
|
55
|
-
setAmountDonate(
|
|
55
|
+
setAmountDonate(otherAmountValue);
|
|
56
56
|
} else {
|
|
57
57
|
const givingData = givingType === 'single' ? singleGiving : regularGiving;
|
|
58
58
|
|
|
@@ -63,7 +63,7 @@ const Signup = ({
|
|
|
63
63
|
? givingData.moneybuys[1].value
|
|
64
64
|
: givingData.moneybuys[0].value;
|
|
65
65
|
|
|
66
|
-
setAmountDonate(
|
|
66
|
+
setAmountDonate(thisAmount);
|
|
67
67
|
}
|
|
68
68
|
}, [givingType, singleGiving, regularGiving, otherAmountValue]);
|
|
69
69
|
|
|
@@ -79,9 +79,9 @@ const Signup = ({
|
|
|
79
79
|
|
|
80
80
|
return (
|
|
81
81
|
index === 1
|
|
82
|
-
&& amountDonate ===
|
|
82
|
+
&& amountDonate === undefined
|
|
83
83
|
&& (setMoneyBuyCopy(moneyBuy.description),
|
|
84
|
-
setAmountDonate(
|
|
84
|
+
setAmountDonate(moneyBuy.value))
|
|
85
85
|
);
|
|
86
86
|
});
|
|
87
87
|
|
|
@@ -136,7 +136,7 @@ const Signup = ({
|
|
|
136
136
|
// Update the local state if the prop has been set and changed
|
|
137
137
|
useEffect(() => {
|
|
138
138
|
if (otherAmountValue) {
|
|
139
|
-
setAmountDonate(
|
|
139
|
+
setAmountDonate(otherAmountValue);
|
|
140
140
|
}
|
|
141
141
|
}, [otherAmountValue, setAmountDonate]);
|
|
142
142
|
|
|
@@ -166,7 +166,7 @@ const Signup = ({
|
|
|
166
166
|
? givingData.moneybuys[1].value
|
|
167
167
|
: givingData.moneybuys[0].value;
|
|
168
168
|
|
|
169
|
-
setAmountDonate(
|
|
169
|
+
setAmountDonate(thisAmount);
|
|
170
170
|
}
|
|
171
171
|
}, [errorMsg, givingData.moneybuys]);
|
|
172
172
|
|
|
@@ -186,9 +186,9 @@ const Signup = ({
|
|
|
186
186
|
return 'Donate';
|
|
187
187
|
}
|
|
188
188
|
if (givingType === 'single') {
|
|
189
|
-
return `Donate £${
|
|
189
|
+
return `Donate £${amountDonate} now`;
|
|
190
190
|
}
|
|
191
|
-
return `Donate £${
|
|
191
|
+
return `Donate £${amountDonate} monthly`;
|
|
192
192
|
};
|
|
193
193
|
|
|
194
194
|
return (
|
|
@@ -226,9 +226,9 @@ const Signup = ({
|
|
|
226
226
|
{givingData.moneybuys.map(({ value }, index) => (
|
|
227
227
|
<MoneyBuy
|
|
228
228
|
isSelected={amountDonate === value}
|
|
229
|
-
amount={
|
|
229
|
+
amount={value.toString()}
|
|
230
230
|
description={`£${amountFormatter(value)}`}
|
|
231
|
-
setOtherAmount={() => setAmountDonate(
|
|
231
|
+
setOtherAmount={() => setAmountDonate(value)}
|
|
232
232
|
key={value}
|
|
233
233
|
name={`${mbshipID}--moneyBuy${index + 1}`}
|
|
234
234
|
id={`${mbshipID}--moneyBuy-box${index + 1}`}
|
|
@@ -245,7 +245,7 @@ const Signup = ({
|
|
|
245
245
|
<AmountField
|
|
246
246
|
step="0.01"
|
|
247
247
|
name="membership_amount"
|
|
248
|
-
type="
|
|
248
|
+
type="string"
|
|
249
249
|
inputBorderColor={isAmountValid(amountDonate) === false}
|
|
250
250
|
label="£"
|
|
251
251
|
errorMsg=""
|
|
@@ -254,17 +254,17 @@ const Signup = ({
|
|
|
254
254
|
{...rest}
|
|
255
255
|
max="25000"
|
|
256
256
|
min="1"
|
|
257
|
-
value={
|
|
258
|
-
pattern="[^[0-9]+([,.][0-9]+)?$]"
|
|
257
|
+
value={amountDonate}
|
|
258
|
+
pattern="[^[0-9]+([,.][0-9]+)?$]" // this only applies on submit
|
|
259
259
|
placeholder="0.00"
|
|
260
|
-
onChange={e => setAmountDonate(
|
|
260
|
+
onChange={e => setAmountDonate(e.target.value.trim())}
|
|
261
261
|
aria-label="Input a different amount"
|
|
262
262
|
ref={amountRef}
|
|
263
263
|
/>
|
|
264
264
|
</FormFieldset>
|
|
265
265
|
{amountDonate >= 1 && !noMoneyBuys && moneyBuyCopy && (
|
|
266
266
|
<Copy as="p">
|
|
267
|
-
<strong>{`£${amountDonate
|
|
267
|
+
<strong>{`£${amountDonate} `}</strong>
|
|
268
268
|
{moneyBuyCopy}
|
|
269
269
|
</Copy>
|
|
270
270
|
)}
|
|
@@ -283,7 +283,7 @@ const Signup = ({
|
|
|
283
283
|
>
|
|
284
284
|
{errorMsg
|
|
285
285
|
? 'Donate'
|
|
286
|
-
: `Donate £${
|
|
286
|
+
: `Donate £${amountDonate}`}
|
|
287
287
|
</Button>
|
|
288
288
|
) : (
|
|
289
289
|
<Button
|
|
@@ -318,8 +318,8 @@ Signup.propTypes = {
|
|
|
318
318
|
|
|
319
319
|
Signup.defaultProps = {
|
|
320
320
|
noMoneyBuys: false,
|
|
321
|
-
|
|
322
|
-
|
|
321
|
+
otherAmountValue: null,
|
|
322
|
+
data: {}
|
|
323
323
|
};
|
|
324
324
|
|
|
325
325
|
export default Signup;
|
|
@@ -628,8 +628,8 @@ exports[`"Single Giving, No Money Buys, with overridden manual input value" rend
|
|
|
628
628
|
placeholder="0.00"
|
|
629
629
|
required={false}
|
|
630
630
|
step="0.01"
|
|
631
|
-
type="
|
|
632
|
-
value=
|
|
631
|
+
type="string"
|
|
632
|
+
value={345.67}
|
|
633
633
|
/>
|
|
634
634
|
</div>
|
|
635
635
|
|
|
@@ -1358,7 +1358,7 @@ exports[`Monthly donation renders correctly 1`] = `
|
|
|
1358
1358
|
|
|
1359
1359
|
<input
|
|
1360
1360
|
aria-describedby="mship-1--moneyBuy-box1"
|
|
1361
|
-
aria-label="£
|
|
1361
|
+
aria-label="£12.10"
|
|
1362
1362
|
className="c23"
|
|
1363
1363
|
id="mship-1--moneyBuy-box1"
|
|
1364
1364
|
name="mship-1--moneyBuy1"
|
|
@@ -1366,7 +1366,7 @@ exports[`Monthly donation renders correctly 1`] = `
|
|
|
1366
1366
|
placeholder=""
|
|
1367
1367
|
required={false}
|
|
1368
1368
|
type="button"
|
|
1369
|
-
value="£
|
|
1369
|
+
value="£ 12.10"
|
|
1370
1370
|
/>
|
|
1371
1371
|
</div>
|
|
1372
1372
|
|
|
@@ -1391,7 +1391,7 @@ exports[`Monthly donation renders correctly 1`] = `
|
|
|
1391
1391
|
|
|
1392
1392
|
<input
|
|
1393
1393
|
aria-describedby="mship-1--moneyBuy-box2"
|
|
1394
|
-
aria-label="£20"
|
|
1394
|
+
aria-label="£20.00"
|
|
1395
1395
|
className="c23"
|
|
1396
1396
|
id="mship-1--moneyBuy-box2"
|
|
1397
1397
|
name="mship-1--moneyBuy2"
|
|
@@ -1424,7 +1424,7 @@ exports[`Monthly donation renders correctly 1`] = `
|
|
|
1424
1424
|
|
|
1425
1425
|
<input
|
|
1426
1426
|
aria-describedby="mship-1--moneyBuy-box3"
|
|
1427
|
-
aria-label="£30"
|
|
1427
|
+
aria-label="£30.00"
|
|
1428
1428
|
className="c23"
|
|
1429
1429
|
id="mship-1--moneyBuy-box3"
|
|
1430
1430
|
name="mship-1--moneyBuy3"
|
|
@@ -1479,8 +1479,8 @@ exports[`Monthly donation renders correctly 1`] = `
|
|
|
1479
1479
|
placeholder="0.00"
|
|
1480
1480
|
required={false}
|
|
1481
1481
|
step="0.01"
|
|
1482
|
-
type="
|
|
1483
|
-
value=
|
|
1482
|
+
type="string"
|
|
1483
|
+
value={10}
|
|
1484
1484
|
/>
|
|
1485
1485
|
</div>
|
|
1486
1486
|
|
|
@@ -1490,7 +1490,7 @@ exports[`Monthly donation renders correctly 1`] = `
|
|
|
1490
1490
|
className="c28"
|
|
1491
1491
|
>
|
|
1492
1492
|
<strong>
|
|
1493
|
-
£10
|
|
1493
|
+
£10
|
|
1494
1494
|
</strong>
|
|
1495
1495
|
</p>
|
|
1496
1496
|
<button
|
|
@@ -2192,8 +2192,8 @@ exports[`Single donation renders correctly 1`] = `
|
|
|
2192
2192
|
placeholder="0.00"
|
|
2193
2193
|
required={false}
|
|
2194
2194
|
step="0.01"
|
|
2195
|
-
type="
|
|
2196
|
-
value=
|
|
2195
|
+
type="string"
|
|
2196
|
+
value={20}
|
|
2197
2197
|
/>
|
|
2198
2198
|
</div>
|
|
2199
2199
|
|
|
@@ -2203,7 +2203,7 @@ exports[`Single donation renders correctly 1`] = `
|
|
|
2203
2203
|
className="c23"
|
|
2204
2204
|
>
|
|
2205
2205
|
<strong>
|
|
2206
|
-
£20
|
|
2206
|
+
£20
|
|
2207
2207
|
</strong>
|
|
2208
2208
|
a support worker to visit 10 isolated young mums with postnatal depression in the UK.
|
|
2209
2209
|
</p>
|
|
@@ -2660,8 +2660,8 @@ exports[`Single donation with no Money Buys renders correctly 1`] = `
|
|
|
2660
2660
|
placeholder="0.00"
|
|
2661
2661
|
required={false}
|
|
2662
2662
|
step="0.01"
|
|
2663
|
-
type="
|
|
2664
|
-
value=
|
|
2663
|
+
type="string"
|
|
2664
|
+
value={10}
|
|
2665
2665
|
/>
|
|
2666
2666
|
</div>
|
|
2667
2667
|
|
|
@@ -5,17 +5,17 @@ export default {
|
|
|
5
5
|
{
|
|
6
6
|
description:
|
|
7
7
|
'a pregnant woman in Uganda to have access to a birth kit so she can have a clean, safe delivery.',
|
|
8
|
-
value: 10
|
|
8
|
+
value: '12.10'
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
description:
|
|
12
12
|
'a support worker to visit 10 isolated young mums with postnatal depression in the UK.',
|
|
13
|
-
value: 20
|
|
13
|
+
value: '20'
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
description:
|
|
17
17
|
'clothes for a child who has had to leave their possessions behind while escaping domestic abuse.',
|
|
18
|
-
value: 30
|
|
18
|
+
value: '30'
|
|
19
19
|
}
|
|
20
20
|
]
|
|
21
21
|
},
|
|
@@ -24,17 +24,17 @@ export default {
|
|
|
24
24
|
{
|
|
25
25
|
description:
|
|
26
26
|
'a regular supply of toiletries for someone living in a refugee camp in Serbia.',
|
|
27
|
-
value: 5
|
|
27
|
+
value: '5.50'
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
description:
|
|
31
31
|
'a potentially lifesaving call for a man at risk of suicide in the UK.',
|
|
32
|
-
value: 10
|
|
32
|
+
value: '10'
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
description:
|
|
36
36
|
'the distribution of enough surplus food for a school breakfast club to feed 80 children.',
|
|
37
|
-
value: 20
|
|
37
|
+
value: '20'
|
|
38
38
|
}
|
|
39
39
|
]
|
|
40
40
|
}
|
|
@@ -36,6 +36,25 @@ import Link from '../../Atoms/Link/Link';
|
|
|
36
36
|
/>;
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
+
# Pride header
|
|
40
|
+
|
|
41
|
+
```js
|
|
42
|
+
import data from './data/data';
|
|
43
|
+
import Link from '../../Atoms/Link/Link';
|
|
44
|
+
|
|
45
|
+
<Header
|
|
46
|
+
navItems={data}
|
|
47
|
+
campaign="Pride"
|
|
48
|
+
metaIcons={
|
|
49
|
+
<>
|
|
50
|
+
<Link color="green" type="button" href="/donation">
|
|
51
|
+
Donate
|
|
52
|
+
</Link>
|
|
53
|
+
</>
|
|
54
|
+
}
|
|
55
|
+
/>;
|
|
56
|
+
```
|
|
57
|
+
|
|
39
58
|
# Comic Relief header with Search
|
|
40
59
|
|
|
41
60
|
```js
|
|
@@ -173,7 +173,7 @@ const Signup = ({
|
|
|
173
173
|
max="25000"
|
|
174
174
|
min="1"
|
|
175
175
|
value={userInput}
|
|
176
|
-
pattern="[^[0-9]+([,.][0-9]+)?$]"
|
|
176
|
+
pattern="[^[0-9]+([,.][0-9]+)?$]" // this only applies on submit
|
|
177
177
|
placeholder="0.00"
|
|
178
178
|
onChange={e => handleChange(e.target.value, otherDescription)}
|
|
179
179
|
onClick={e => hightlightInput(e.target.value, otherDescription)}
|
|
@@ -5,17 +5,17 @@ export default {
|
|
|
5
5
|
{
|
|
6
6
|
description:
|
|
7
7
|
'a regular supply of toiletries for someone living in a refugee camp in Serbia.',
|
|
8
|
-
value: 5
|
|
8
|
+
value: '5'
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
description:
|
|
12
12
|
'a potentially lifesaving call for a man at risk of suicide in the UK.',
|
|
13
|
-
value: 10
|
|
13
|
+
value: '10'
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
description:
|
|
17
17
|
'the distribution of enough surplus food for a school breakfast club to feed 80 children.',
|
|
18
|
-
value: 20
|
|
18
|
+
value: '20'
|
|
19
19
|
}
|
|
20
20
|
]
|
|
21
21
|
}
|