@comicrelief/component-library 6.2.0 → 6.3.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/dist/components/Atoms/Picture/Picture.md +6 -9
- package/dist/components/Atoms/Picture/Picture.test.js +5 -5
- package/dist/components/Molecules/ArticleTeaser/ArticleTeaser.md +6 -8
- package/dist/components/Molecules/ArticleTeaser/ArticleTeaser.test.js +3 -3
- package/dist/components/Molecules/Box/Box.md +5 -7
- package/dist/components/Molecules/Box/Box.test.js +3 -3
- package/dist/components/Molecules/Card/Card.md +5 -7
- package/dist/components/Molecules/Card/Card.test.js +5 -5
- package/dist/components/Molecules/CardDs/CardDs.md +8 -12
- package/dist/components/Molecules/CardDs/CardDs.test.js +3 -3
- package/dist/components/Molecules/PartnerLink/PartnerLink.md +2 -3
- package/dist/components/Molecules/PartnerLink/PartnerLink.test.js +3 -3
- package/dist/components/Molecules/Promo/Promo.md +13 -14
- package/dist/components/Molecules/Promo/Promo.test.js +5 -5
- package/dist/components/Molecules/SearchResult/SearchResult.md +12 -16
- package/dist/components/Molecules/SearchResult/SearchResult.test.js +5 -5
- package/dist/components/Molecules/SingleMessage/SingleMessage.md +37 -48
- package/dist/components/Molecules/SingleMessage/SingleMessage.test.js +15 -15
- package/dist/components/Molecules/SingleMessageDS/SingleMessageDs.md +15 -20
- package/dist/components/Molecules/SingleMessageDS/SingleMessageDs.test.js +3 -3
- package/dist/components/Organisms/Donate/Donate.js +35 -7
- package/dist/components/Organisms/Donate/Donate.md +148 -14
- package/dist/components/Organisms/Donate/Donate.style.js +61 -45
- package/dist/components/Organisms/Donate/Donate.test.js +7 -7
- package/dist/components/Organisms/Donate/Form/Form.js +6 -1
- package/dist/components/Organisms/Donate/Form/PopUpComponent.js +74 -0
- package/dist/components/Organisms/Donate/__snapshots__/Donate.test.js.snap +344 -388
- package/dist/components/Organisms/Donate/assets/close.svg +3 -0
- package/dist/components/Organisms/Membership/Membership.md +6 -6
- package/dist/components/Organisms/Membership/Membership.test.js +5 -5
- package/dist/styleguide/data/data.js +9 -3
- package/package.json +2 -1
- package/src/components/Atoms/Picture/Picture.md +6 -9
- package/src/components/Atoms/Picture/Picture.test.js +4 -5
- package/src/components/Molecules/ArticleTeaser/ArticleTeaser.md +6 -8
- package/src/components/Molecules/ArticleTeaser/ArticleTeaser.test.js +3 -4
- package/src/components/Molecules/Box/Box.md +5 -7
- package/src/components/Molecules/Box/Box.test.js +2 -3
- package/src/components/Molecules/Card/Card.md +5 -7
- package/src/components/Molecules/Card/Card.test.js +3 -4
- package/src/components/Molecules/CardDs/CardDs.md +8 -12
- package/src/components/Molecules/CardDs/CardDs.test.js +3 -4
- package/src/components/Molecules/PartnerLink/PartnerLink.md +2 -3
- package/src/components/Molecules/PartnerLink/PartnerLink.test.js +2 -3
- package/src/components/Molecules/Promo/Promo.md +13 -14
- package/src/components/Molecules/Promo/Promo.test.js +5 -6
- package/src/components/Molecules/SearchResult/SearchResult.md +12 -16
- package/src/components/Molecules/SearchResult/SearchResult.test.js +5 -5
- package/src/components/Molecules/SingleMessage/SingleMessage.md +37 -48
- package/src/components/Molecules/SingleMessage/SingleMessage.test.js +15 -16
- package/src/components/Molecules/SingleMessageDS/SingleMessageDs.md +15 -20
- package/src/components/Molecules/SingleMessageDS/SingleMessageDs.test.js +3 -4
- package/src/components/Organisms/Donate/Donate.js +91 -50
- package/src/components/Organisms/Donate/Donate.md +148 -14
- package/src/components/Organisms/Donate/Donate.style.js +16 -1
- package/src/components/Organisms/Donate/Donate.test.js +7 -7
- package/src/components/Organisms/Donate/Form/Form.js +9 -1
- package/src/components/Organisms/Donate/Form/PopUpComponent.js +63 -0
- package/src/components/Organisms/Donate/__snapshots__/Donate.test.js.snap +344 -388
- package/src/components/Organisms/Donate/assets/close.svg +3 -0
- package/src/components/Organisms/Membership/Membership.md +6 -6
- package/src/components/Organisms/Membership/Membership.test.js +9 -14
- package/src/styleguide/data/data.js +12 -1
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
Single Message
|
|
2
2
|
|
|
3
3
|
```js
|
|
4
|
-
const
|
|
5
|
-
import Text from '../../Atoms/Text/Text';
|
|
4
|
+
const defaultData = require('../../../styleguide/data/data').defaultData;import Text from '../../Atoms/Text/Text';
|
|
6
5
|
import Link from '../../Atoms/Link/Link';
|
|
7
6
|
|
|
8
7
|
<SingleMessage
|
|
9
8
|
backgroundColor="purple_dark"
|
|
10
|
-
imageSet={
|
|
11
|
-
image={
|
|
9
|
+
imageSet={defaultData.images}
|
|
10
|
+
image={defaultData.image}
|
|
12
11
|
imageAltText=""
|
|
13
12
|
copyFirst={false}
|
|
14
13
|
>
|
|
@@ -29,14 +28,13 @@ import Link from '../../Atoms/Link/Link';
|
|
|
29
28
|
Single Message fullImage
|
|
30
29
|
|
|
31
30
|
```js
|
|
32
|
-
const
|
|
33
|
-
import Text from '../../Atoms/Text/Text';
|
|
31
|
+
const defaultData = require('../../../styleguide/data/data').defaultData;import Text from '../../Atoms/Text/Text';
|
|
34
32
|
import Link from '../../Atoms/Link/Link';
|
|
35
33
|
|
|
36
34
|
<SingleMessage
|
|
37
35
|
backgroundColor="purple_dark"
|
|
38
|
-
imageSet={
|
|
39
|
-
image={
|
|
36
|
+
imageSet={defaultData.images}
|
|
37
|
+
image={defaultData.image}
|
|
40
38
|
imageAltText=""
|
|
41
39
|
copyFirst={false}
|
|
42
40
|
fullImage={true}
|
|
@@ -59,14 +57,13 @@ import Link from '../../Atoms/Link/Link';
|
|
|
59
57
|
Single Message fullImage no copy
|
|
60
58
|
|
|
61
59
|
```js
|
|
62
|
-
const
|
|
63
|
-
import Text from '../../Atoms/Text/Text';
|
|
60
|
+
const defaultData = require('../../../styleguide/data/data').defaultData;import Text from '../../Atoms/Text/Text';
|
|
64
61
|
import Link from '../../Atoms/Link/Link';
|
|
65
62
|
|
|
66
63
|
<SingleMessage
|
|
67
64
|
backgroundColor="purple_dark"
|
|
68
|
-
imageSet={
|
|
69
|
-
image={
|
|
65
|
+
imageSet={defaultData.images}
|
|
66
|
+
image={defaultData.image}
|
|
70
67
|
imageAltText=""
|
|
71
68
|
copyFirst={false}
|
|
72
69
|
fullImage={true}
|
|
@@ -91,13 +88,12 @@ Single Message vertical height 100%
|
|
|
91
88
|
|
|
92
89
|
```js
|
|
93
90
|
import Text from '../../Atoms/Text/Text';
|
|
94
|
-
const
|
|
95
|
-
|
|
91
|
+
const defaultData = require('../../../styleguide/data/data').defaultData;
|
|
96
92
|
<SingleMessage
|
|
97
93
|
backgroundColor="purple_dark"
|
|
98
|
-
imageLow={
|
|
99
|
-
imageSet={
|
|
100
|
-
image={
|
|
94
|
+
imageLow={defaultData.imageLow}
|
|
95
|
+
imageSet={defaultData.images}
|
|
96
|
+
image={defaultData.image}
|
|
101
97
|
imageAltText=""
|
|
102
98
|
vhFull
|
|
103
99
|
>
|
|
@@ -112,16 +108,15 @@ Single Message double image
|
|
|
112
108
|
|
|
113
109
|
```js
|
|
114
110
|
import Text from '../../Atoms/Text/Text';
|
|
115
|
-
const
|
|
116
|
-
|
|
111
|
+
const defaultData = require('../../../styleguide/data/data').defaultData;
|
|
117
112
|
<SingleMessage
|
|
118
113
|
backgroundColor="yellow"
|
|
119
|
-
imageLow={
|
|
120
|
-
imageSet={
|
|
121
|
-
image={
|
|
114
|
+
imageLow={defaultData.imageLow}
|
|
115
|
+
imageSet={defaultData.images}
|
|
116
|
+
image={defaultData.image}
|
|
122
117
|
imageAltText=""
|
|
123
|
-
imageSet2={
|
|
124
|
-
image2={
|
|
118
|
+
imageSet2={defaultData.images}
|
|
119
|
+
image2={defaultData.image}
|
|
125
120
|
imageAltText2=""
|
|
126
121
|
>
|
|
127
122
|
<Text tag="p" color="black" size="xxl">
|
|
@@ -135,12 +130,11 @@ Single Message with 16:9 video
|
|
|
135
130
|
|
|
136
131
|
```js
|
|
137
132
|
import Text from '../../Atoms/Text/Text';
|
|
138
|
-
const
|
|
139
|
-
|
|
133
|
+
const defaultData = require('../../../styleguide/data/data').defaultData;
|
|
140
134
|
<SingleMessage
|
|
141
135
|
backgroundColor="purple"
|
|
142
|
-
imageSet={
|
|
143
|
-
image={
|
|
136
|
+
imageSet={defaultData.images}
|
|
137
|
+
image={defaultData.image}
|
|
144
138
|
imageAltText=""
|
|
145
139
|
copyFirst={true}
|
|
146
140
|
videoID="WUgvvPRH7Oc"
|
|
@@ -154,12 +148,11 @@ const data = require('../../../styleguide/data/data').default;
|
|
|
154
148
|
|
|
155
149
|
```js
|
|
156
150
|
import Text from '../../Atoms/Text/Text';
|
|
157
|
-
const
|
|
158
|
-
|
|
151
|
+
const defaultData = require('../../../styleguide/data/data').defaultData;
|
|
159
152
|
<SingleMessage
|
|
160
153
|
backgroundColor="purple"
|
|
161
|
-
imageSet={
|
|
162
|
-
image={
|
|
154
|
+
imageSet={defaultData.images}
|
|
155
|
+
image={defaultData.image}
|
|
163
156
|
imageAltText=""
|
|
164
157
|
copyFirst={false}
|
|
165
158
|
videoID="WUgvvPRH7Oc"
|
|
@@ -175,12 +168,11 @@ Single Message with portrait video
|
|
|
175
168
|
|
|
176
169
|
```js
|
|
177
170
|
import Text from '../../Atoms/Text/Text';
|
|
178
|
-
const
|
|
179
|
-
|
|
171
|
+
const defaultData = require('../../../styleguide/data/data').defaultData;
|
|
180
172
|
<SingleMessage
|
|
181
173
|
backgroundColor="purple"
|
|
182
|
-
imageSet={
|
|
183
|
-
image={
|
|
174
|
+
imageSet={defaultData.images}
|
|
175
|
+
image={defaultData.image}
|
|
184
176
|
imageAltText=""
|
|
185
177
|
copyFirst={true}
|
|
186
178
|
videoID="FoMlSB6ftQg"
|
|
@@ -195,12 +187,11 @@ Single Message with portrait video, 100VH
|
|
|
195
187
|
|
|
196
188
|
```js
|
|
197
189
|
import Text from '../../Atoms/Text/Text';
|
|
198
|
-
const
|
|
199
|
-
|
|
190
|
+
const defaultData = require('../../../styleguide/data/data').defaultData;
|
|
200
191
|
<SingleMessage
|
|
201
192
|
backgroundColor="purple"
|
|
202
|
-
imageSet={
|
|
203
|
-
image={
|
|
193
|
+
imageSet={defaultData.images}
|
|
194
|
+
image={defaultData.image}
|
|
204
195
|
imageAltText=""
|
|
205
196
|
copyFirst={true}
|
|
206
197
|
videoID="fwCQRMlKBnA"
|
|
@@ -216,12 +207,11 @@ Single Message with landscape video, 100VH, fullwidth image
|
|
|
216
207
|
|
|
217
208
|
```js
|
|
218
209
|
import Text from '../../Atoms/Text/Text';
|
|
219
|
-
const
|
|
220
|
-
|
|
210
|
+
const defaultData = require('../../../styleguide/data/data').defaultData;
|
|
221
211
|
<SingleMessage
|
|
222
212
|
backgroundColor="purple"
|
|
223
|
-
imageSet={
|
|
224
|
-
image={
|
|
213
|
+
imageSet={defaultData.images}
|
|
214
|
+
image={defaultData.image}
|
|
225
215
|
imageAltText=""
|
|
226
216
|
copyFirst={true}
|
|
227
217
|
videoID="WUgvvPRH7Oc"
|
|
@@ -239,12 +229,11 @@ Single Message with landscape video, 50VH, fullwidth image
|
|
|
239
229
|
|
|
240
230
|
```js
|
|
241
231
|
import Text from '../../Atoms/Text/Text';
|
|
242
|
-
const
|
|
243
|
-
|
|
232
|
+
const defaultData = require('../../../styleguide/data/data').defaultData;
|
|
244
233
|
<SingleMessage
|
|
245
234
|
backgroundColor="purple"
|
|
246
|
-
imageSet={
|
|
247
|
-
image={
|
|
235
|
+
imageSet={defaultData.images}
|
|
236
|
+
image={defaultData.image}
|
|
248
237
|
imageAltText=""
|
|
249
238
|
copyFirst={true}
|
|
250
239
|
videoID="WUgvvPRH7Oc"
|
|
@@ -10,7 +10,7 @@ var _shallowWithTheme = _interopRequireDefault(require("../../../hoc/shallowWith
|
|
|
10
10
|
|
|
11
11
|
var _SingleMessage = _interopRequireDefault(require("./SingleMessage"));
|
|
12
12
|
|
|
13
|
-
var _data =
|
|
13
|
+
var _data = require("../../../styleguide/data/data");
|
|
14
14
|
|
|
15
15
|
var _Text = _interopRequireDefault(require("../../Atoms/Text/Text"));
|
|
16
16
|
|
|
@@ -19,8 +19,8 @@ var _Link = _interopRequireDefault(require("../../Atoms/Link/Link"));
|
|
|
19
19
|
it('renders Single Message with Image correctly', function () {
|
|
20
20
|
var tree = (0, _shallowWithTheme.default)( /*#__PURE__*/_react.default.createElement(_SingleMessage.default, {
|
|
21
21
|
backgroundColor: "purple",
|
|
22
|
-
imageSet: _data.
|
|
23
|
-
image: _data.
|
|
22
|
+
imageSet: _data.defaultData.images,
|
|
23
|
+
image: _data.defaultData.image,
|
|
24
24
|
imageAltText: "",
|
|
25
25
|
copyFirst: false
|
|
26
26
|
}, /*#__PURE__*/_react.default.createElement(_Text.default, {
|
|
@@ -51,8 +51,8 @@ it('renders Single Message with no Image correctly', function () {
|
|
|
51
51
|
it('renders Single Message with full width correctly', function () {
|
|
52
52
|
var tree = (0, _shallowWithTheme.default)( /*#__PURE__*/_react.default.createElement(_SingleMessage.default, {
|
|
53
53
|
backgroundColor: "purple",
|
|
54
|
-
imageSet: _data.
|
|
55
|
-
image: _data.
|
|
54
|
+
imageSet: _data.defaultData.images,
|
|
55
|
+
image: _data.defaultData.image,
|
|
56
56
|
imageAltText: "",
|
|
57
57
|
copyFirst: false,
|
|
58
58
|
fullImage: true
|
|
@@ -73,8 +73,8 @@ it('renders Single Message with full width correctly', function () {
|
|
|
73
73
|
it('renders Single Message with full width image and no text correctly', function () {
|
|
74
74
|
var tree = (0, _shallowWithTheme.default)( /*#__PURE__*/_react.default.createElement(_SingleMessage.default, {
|
|
75
75
|
backgroundColor: "purple",
|
|
76
|
-
imageSet: _data.
|
|
77
|
-
image: _data.
|
|
76
|
+
imageSet: _data.defaultData.images,
|
|
77
|
+
image: _data.defaultData.image,
|
|
78
78
|
imageAltText: "",
|
|
79
79
|
copyFirst: false,
|
|
80
80
|
fullImage: true
|
|
@@ -84,9 +84,9 @@ it('renders Single Message with full width image and no text correctly', functio
|
|
|
84
84
|
it('renders Single Message with 100% vertical height image correctly', function () {
|
|
85
85
|
var tree = (0, _shallowWithTheme.default)( /*#__PURE__*/_react.default.createElement(_SingleMessage.default, {
|
|
86
86
|
backgroundColor: "purple",
|
|
87
|
-
imageLow: _data.
|
|
88
|
-
imageSet: _data.
|
|
89
|
-
image: _data.
|
|
87
|
+
imageLow: _data.defaultData.imageLow,
|
|
88
|
+
imageSet: _data.defaultData.images,
|
|
89
|
+
image: _data.defaultData.image,
|
|
90
90
|
imageAltText: "",
|
|
91
91
|
vhFull: true
|
|
92
92
|
}, /*#__PURE__*/_react.default.createElement(_Text.default, {
|
|
@@ -99,12 +99,12 @@ it('renders Single Message with 100% vertical height image correctly', function
|
|
|
99
99
|
it('renders Single Message with double image correctly', function () {
|
|
100
100
|
var tree = (0, _shallowWithTheme.default)( /*#__PURE__*/_react.default.createElement(_SingleMessage.default, {
|
|
101
101
|
backgroundColor: "yellow",
|
|
102
|
-
imageLow: _data.
|
|
103
|
-
imageSet: _data.
|
|
104
|
-
image: _data.
|
|
102
|
+
imageLow: _data.defaultData.imageLow,
|
|
103
|
+
imageSet: _data.defaultData.images,
|
|
104
|
+
image: _data.defaultData.image,
|
|
105
105
|
imageAltText: "",
|
|
106
|
-
imageSet2: _data.
|
|
107
|
-
image2: _data.
|
|
106
|
+
imageSet2: _data.defaultData.images,
|
|
107
|
+
image2: _data.defaultData.image,
|
|
108
108
|
imageAltText2: ""
|
|
109
109
|
}, /*#__PURE__*/_react.default.createElement(_Text.default, {
|
|
110
110
|
tag: "p",
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
## Image align left and CTA are clickable and links user through to full conten
|
|
4
4
|
|
|
5
5
|
```js
|
|
6
|
-
const
|
|
7
|
-
import Text from '../../Atoms/Text/Text';
|
|
6
|
+
const defaultData = require('../../../styleguide/data/data').defaultData;import Text from '../../Atoms/Text/Text';
|
|
8
7
|
import Link from '../../Atoms/Link/Link';
|
|
9
8
|
import styled from 'styled-components';
|
|
10
9
|
import spacing from '../../../theme/shared/spacing';
|
|
@@ -29,8 +28,8 @@ const Title = styled(Text)`
|
|
|
29
28
|
link='/home'
|
|
30
29
|
linkLabel='Check out'
|
|
31
30
|
backgroundColor='white'
|
|
32
|
-
imageLow={
|
|
33
|
-
images={
|
|
31
|
+
imageLow={defaultData.image}
|
|
32
|
+
images={defaultData.images}
|
|
34
33
|
imageAltText='Happy man going to work'
|
|
35
34
|
subtitle="Subtitle"
|
|
36
35
|
height='100%'
|
|
@@ -51,8 +50,7 @@ const Title = styled(Text)`
|
|
|
51
50
|
## Image align right and CTA are clickable and links user through to full content
|
|
52
51
|
|
|
53
52
|
```js
|
|
54
|
-
const
|
|
55
|
-
import Text from '../../Atoms/Text/Text';
|
|
53
|
+
const defaultData = require('../../../styleguide/data/data').defaultData;import Text from '../../Atoms/Text/Text';
|
|
56
54
|
import Link from '../../Atoms/Link/Link';
|
|
57
55
|
import styled from 'styled-components';
|
|
58
56
|
import spacing from '../../../theme/shared/spacing';
|
|
@@ -77,8 +75,8 @@ const Title = styled(Text)`
|
|
|
77
75
|
ctaBgColor="blue_dark"
|
|
78
76
|
backgroundColor='white'
|
|
79
77
|
imageLeft={false}
|
|
80
|
-
imageLow={
|
|
81
|
-
images={
|
|
78
|
+
imageLow={defaultData.image}
|
|
79
|
+
images={defaultData.images}
|
|
82
80
|
imageAltText='Happy man going to work'
|
|
83
81
|
subtitle="Subtitle"
|
|
84
82
|
height='100%'
|
|
@@ -98,8 +96,7 @@ const Title = styled(Text)`
|
|
|
98
96
|
## Image align with non CTA
|
|
99
97
|
|
|
100
98
|
```js
|
|
101
|
-
const
|
|
102
|
-
import Text from '../../Atoms/Text/Text';
|
|
99
|
+
const defaultData = require('../../../styleguide/data/data').defaultData;import Text from '../../Atoms/Text/Text';
|
|
103
100
|
import Link from '../../Atoms/Link/Link';
|
|
104
101
|
import styled from 'styled-components';
|
|
105
102
|
import spacing from '../../../theme/shared/spacing';
|
|
@@ -122,8 +119,8 @@ const Title = styled(Text)`
|
|
|
122
119
|
ctaBgColor="blue_dark"
|
|
123
120
|
backgroundColor='white'
|
|
124
121
|
imageLeft={true}
|
|
125
|
-
imageLow={
|
|
126
|
-
images={
|
|
122
|
+
imageLow={defaultData.image}
|
|
123
|
+
images={defaultData.images}
|
|
127
124
|
imageAltText='Happy man going to work'
|
|
128
125
|
subtitle="Subtitle"
|
|
129
126
|
height='100%'
|
|
@@ -143,8 +140,7 @@ const Title = styled(Text)`
|
|
|
143
140
|
## Using the linkIcon prop (to display download icon)
|
|
144
141
|
|
|
145
142
|
```js
|
|
146
|
-
const
|
|
147
|
-
import Text from '../../Atoms/Text/Text';
|
|
143
|
+
const defaultData = require('../../../styleguide/data/data').defaultData;import Text from '../../Atoms/Text/Text';
|
|
148
144
|
import Link from '../../Atoms/Link/Link';
|
|
149
145
|
import styled from 'styled-components';
|
|
150
146
|
import spacing from '../../../theme/shared/spacing';
|
|
@@ -155,9 +151,9 @@ import Download from '../../Atoms/Icons/Download';
|
|
|
155
151
|
link="https://assets.ctfassets.net/zsfivwzfgl3t/EsIEuI1teYkbLB7peOtqP/b43a905cffd89115d642fe5a84ff020a/RND21_fundraise_moneybuys_poster.pdf"
|
|
156
152
|
linkLabel='Download this'
|
|
157
153
|
linkIcon={<Download />}
|
|
158
|
-
imageLow={
|
|
154
|
+
imageLow={defaultData.image}
|
|
159
155
|
imageLeft={true}
|
|
160
|
-
images={
|
|
156
|
+
images={defaultData.images}
|
|
161
157
|
>
|
|
162
158
|
<Text tag='p'>
|
|
163
159
|
Whatever you’ve got planned, the Sport Relief shop has everything you need
|
|
@@ -171,8 +167,7 @@ import Download from '../../Atoms/Icons/Download';
|
|
|
171
167
|
## Video with no CTA
|
|
172
168
|
|
|
173
169
|
```js
|
|
174
|
-
const
|
|
175
|
-
import Text from '../../Atoms/Text/Text';
|
|
170
|
+
const defaultData = require('../../../styleguide/data/data').defaultData;import Text from '../../Atoms/Text/Text';
|
|
176
171
|
import Link from '../../Atoms/Link/Link';
|
|
177
172
|
import styled from 'styled-components';
|
|
178
173
|
import spacing from '../../../theme/shared/spacing';
|
|
@@ -180,8 +175,8 @@ import Download from '../../Atoms/Icons/Download';
|
|
|
180
175
|
|
|
181
176
|
<div>
|
|
182
177
|
<SingleMessageDs
|
|
183
|
-
imageLow={
|
|
184
|
-
images={
|
|
178
|
+
imageLow={defaultData.image}
|
|
179
|
+
images={defaultData.images}
|
|
185
180
|
youTubeId="faz0JeBB41M"
|
|
186
181
|
imageLeft={true}
|
|
187
182
|
>
|
|
@@ -14,7 +14,7 @@ var _Text = _interopRequireDefault(require("../../Atoms/Text/Text"));
|
|
|
14
14
|
|
|
15
15
|
var _Download = _interopRequireDefault(require("../../Atoms/Icons/Download"));
|
|
16
16
|
|
|
17
|
-
var _data =
|
|
17
|
+
var _data = require("../../../styleguide/data/data");
|
|
18
18
|
|
|
19
19
|
it('renders correctly', function () {
|
|
20
20
|
var tree = (0, _shallowWithTheme.default)( /*#__PURE__*/_react.default.createElement(_SingleMessageDs.default, {
|
|
@@ -24,8 +24,8 @@ it('renders correctly', function () {
|
|
|
24
24
|
ctaBgColor: "blue_dark",
|
|
25
25
|
backgroundColor: "white",
|
|
26
26
|
imageDirection: "right",
|
|
27
|
-
imageLow: _data.
|
|
28
|
-
images: _data.
|
|
27
|
+
imageLow: _data.defaultData.image,
|
|
28
|
+
images: _data.defaultData.images,
|
|
29
29
|
imageAltText: "Happy man going to work",
|
|
30
30
|
subtitle: "Subtitle",
|
|
31
31
|
title: "Heading Line 1 Heading Line 2",
|
|
@@ -9,6 +9,10 @@ exports.default = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
|
|
12
|
+
var _reactResponsive = require("react-responsive");
|
|
13
|
+
|
|
14
|
+
var _size = require("../../../theme/shared/size");
|
|
15
|
+
|
|
12
16
|
var _Text = _interopRequireDefault(require("../../Atoms/Text/Text"));
|
|
13
17
|
|
|
14
18
|
var _Form = _interopRequireDefault(require("./Form/Form"));
|
|
@@ -29,12 +33,29 @@ var Donate = function Donate(_ref) {
|
|
|
29
33
|
images = _ref.images,
|
|
30
34
|
image = _ref.image,
|
|
31
35
|
imageLow = _ref.imageLow,
|
|
36
|
+
mobileImages = _ref.mobileImages,
|
|
37
|
+
mobileImage = _ref.mobileImage,
|
|
38
|
+
mobileImageLow = _ref.mobileImageLow,
|
|
39
|
+
mobileAlt = _ref.mobileAlt,
|
|
32
40
|
mbshipID = _ref.mbshipID,
|
|
33
|
-
noMoneyBuys = _ref.noMoneyBuys
|
|
41
|
+
noMoneyBuys = _ref.noMoneyBuys,
|
|
42
|
+
PopUpText = _ref.PopUpText;
|
|
43
|
+
var isDesktop = (0, _reactResponsive.useMediaQuery)({
|
|
44
|
+
query: "(min-width: ".concat(_size.screen.medium, ")")
|
|
45
|
+
});
|
|
34
46
|
return /*#__PURE__*/_react.default.createElement(_Donate.Container, {
|
|
35
47
|
backgroundColor: backgroundColor,
|
|
36
48
|
id: mbshipID
|
|
37
|
-
},
|
|
49
|
+
}, !isDesktop && mobileImages ? /*#__PURE__*/_react.default.createElement(_Donate.MobImage, {
|
|
50
|
+
backgroundColor: backgroundColor,
|
|
51
|
+
image: mobileImage,
|
|
52
|
+
images: mobileImages,
|
|
53
|
+
imageLow: mobileImageLow,
|
|
54
|
+
objectFit: "cover",
|
|
55
|
+
width: "100%",
|
|
56
|
+
height: "100%",
|
|
57
|
+
alt: mobileAlt
|
|
58
|
+
}) : null, isDesktop && images ? /*#__PURE__*/_react.default.createElement(_Donate.BgImage, {
|
|
38
59
|
backgroundColor: backgroundColor,
|
|
39
60
|
image: image,
|
|
40
61
|
images: images,
|
|
@@ -48,7 +69,7 @@ var Donate = function Donate(_ref) {
|
|
|
48
69
|
formAlignRight: formAlignRight
|
|
49
70
|
}, /*#__PURE__*/_react.default.createElement(_Donate.Header, {
|
|
50
71
|
formAlignRight: formAlignRight
|
|
51
|
-
}, /*#__PURE__*/_react.default.createElement(_Donate.HeaderInner, null, /*#__PURE__*/_react.default.createElement(_Text.default, {
|
|
72
|
+
}, /*#__PURE__*/_react.default.createElement(_Donate.HeaderInner, null, subtitle && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Text.default, {
|
|
52
73
|
tag: "h2",
|
|
53
74
|
color: "white",
|
|
54
75
|
size: "big",
|
|
@@ -59,14 +80,15 @@ var Donate = function Donate(_ref) {
|
|
|
59
80
|
tag: "p",
|
|
60
81
|
color: "white",
|
|
61
82
|
size: "m"
|
|
62
|
-
}, subtitle))), /*#__PURE__*/_react.default.createElement(_Form.default, {
|
|
83
|
+
}, subtitle)))), /*#__PURE__*/_react.default.createElement(_Form.default, {
|
|
63
84
|
data: data,
|
|
64
85
|
otherDescription: otherDescription,
|
|
65
86
|
cartID: cartID,
|
|
66
87
|
clientID: clientID,
|
|
67
88
|
mbshipID: mbshipID,
|
|
68
89
|
donateLink: donateLink,
|
|
69
|
-
noMoneyBuys: noMoneyBuys
|
|
90
|
+
noMoneyBuys: noMoneyBuys,
|
|
91
|
+
PopUpText: PopUpText
|
|
70
92
|
})));
|
|
71
93
|
};
|
|
72
94
|
|
|
@@ -77,10 +99,16 @@ Donate.defaultProps = {
|
|
|
77
99
|
imageLow: null,
|
|
78
100
|
image: null,
|
|
79
101
|
images: null,
|
|
80
|
-
|
|
102
|
+
mobileImageLow: null,
|
|
103
|
+
mobileImage: null,
|
|
104
|
+
mobileImages: null,
|
|
105
|
+
mobileAlt: '',
|
|
106
|
+
backgroundColor: 'blue_dark',
|
|
81
107
|
mbshipID: null,
|
|
82
108
|
otherDescription: 'will help us fund amazing projects in the UK and around the world.',
|
|
83
|
-
|
|
109
|
+
subtitle: '',
|
|
110
|
+
noMoneyBuys: false,
|
|
111
|
+
PopUpText: "Will you become one of our valued monthly supporters by converting your single donation into a smaller, monthly donation? By giving monthly, you'll help us deliver long-term impact."
|
|
84
112
|
};
|
|
85
113
|
var _default = Donate;
|
|
86
114
|
exports.default = _default;
|