@comicrelief/component-library 6.1.5 → 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/cypress/integration/components/Organisms/Donate.spec.js +247 -247
- 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 +11 -6
- package/dist/components/Organisms/Donate/Form/PopUpComponent.js +74 -0
- package/dist/components/Organisms/Donate/GivingSelector/GivingSelector.js +6 -6
- package/dist/components/Organisms/Donate/__snapshots__/Donate.test.js.snap +355 -399
- 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 +16 -8
- package/src/components/Organisms/Donate/Form/PopUpComponent.js +63 -0
- package/src/components/Organisms/Donate/GivingSelector/GivingSelector.js +6 -6
- package/src/components/Organisms/Donate/__snapshots__/Donate.test.js.snap +355 -399
- 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
|
@@ -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;
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
# Donate
|
|
2
2
|
|
|
3
|
-
## Form align right
|
|
3
|
+
## Form align right, with red backgound on desktop view
|
|
4
4
|
|
|
5
5
|
```js
|
|
6
6
|
import data from './dev-data/data';
|
|
7
|
-
const
|
|
7
|
+
const mobilePictures = require('../../../styleguide/data/data').mobileImages;
|
|
8
|
+
const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
8
9
|
|
|
9
10
|
<Donate
|
|
10
11
|
alt="Background image"
|
|
11
|
-
backgroundColor="
|
|
12
|
+
backgroundColor="red"
|
|
12
13
|
formAlignRight={true}
|
|
13
|
-
imageLow={
|
|
14
|
-
images={
|
|
14
|
+
imageLow={desktopPictures.imageLow}
|
|
15
|
+
images={desktopPictures.images}
|
|
16
|
+
mobileImageLow={mobilePictures.imageLow}
|
|
17
|
+
mobileImages={mobilePictures.images}
|
|
15
18
|
data={data}
|
|
16
19
|
mbshipID="mship-1"
|
|
17
20
|
donateLink="https://donation.comicrelief.com/"
|
|
@@ -27,13 +30,16 @@ const pictures = require('../../../styleguide/data/data').default;
|
|
|
27
30
|
|
|
28
31
|
```js
|
|
29
32
|
import data from './dev-data/data';
|
|
30
|
-
const
|
|
33
|
+
const mobilePictures = require('../../../styleguide/data/data').mobileImages;
|
|
34
|
+
const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
31
35
|
|
|
32
36
|
<Donate
|
|
33
37
|
backgroundColor="blue_dark"
|
|
34
38
|
formAlignRight={false}
|
|
35
|
-
imageLow={
|
|
36
|
-
images={
|
|
39
|
+
imageLow={desktopPictures.imageLow}
|
|
40
|
+
images={desktopPictures.images}
|
|
41
|
+
mobileImageLow={mobilePictures.imageLow}
|
|
42
|
+
mobileImages={mobilePictures.images}
|
|
37
43
|
data={data}
|
|
38
44
|
mbshipID="mship-1"
|
|
39
45
|
donateLink="https://donation.comicrelief.com/"
|
|
@@ -49,13 +55,16 @@ const pictures = require('../../../styleguide/data/data').default;
|
|
|
49
55
|
|
|
50
56
|
```js
|
|
51
57
|
import data from './dev-data/data-single';
|
|
52
|
-
const
|
|
58
|
+
const mobilePictures = require('../../../styleguide/data/data').mobileImages;
|
|
59
|
+
const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
53
60
|
|
|
54
61
|
<Donate
|
|
55
62
|
backgroundColor="blue_dark"
|
|
56
63
|
formAlignRight={false}
|
|
57
|
-
imageLow={
|
|
58
|
-
images={
|
|
64
|
+
imageLow={desktopPictures.imageLow}
|
|
65
|
+
images={desktopPictures.images}
|
|
66
|
+
mobileImageLow={mobilePictures.imageLow}
|
|
67
|
+
mobileImages={mobilePictures.images}
|
|
59
68
|
data={data}
|
|
60
69
|
mbshipID="mship-1"
|
|
61
70
|
donateLink="https://donation.comicrelief.com/"
|
|
@@ -71,13 +80,16 @@ const pictures = require('../../../styleguide/data/data').default;
|
|
|
71
80
|
|
|
72
81
|
```js
|
|
73
82
|
import data from './dev-data/data-single';
|
|
74
|
-
const
|
|
83
|
+
const mobilePictures = require('../../../styleguide/data/data').mobileImages;
|
|
84
|
+
const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
75
85
|
|
|
76
86
|
<Donate
|
|
77
87
|
backgroundColor="blue_dark"
|
|
78
88
|
formAlignRight={false}
|
|
79
|
-
imageLow={
|
|
80
|
-
images={
|
|
89
|
+
imageLow={desktopPictures.imageLow}
|
|
90
|
+
images={desktopPictures.images}
|
|
91
|
+
mobileImageLow={mobilePictures.imageLow}
|
|
92
|
+
mobileImages={mobilePictures.images}
|
|
81
93
|
data={data}
|
|
82
94
|
mbshipID="mship-1"
|
|
83
95
|
donateLink="https://donation.comicrelief.com/"
|
|
@@ -89,3 +101,125 @@ const pictures = require('../../../styleguide/data/data').default;
|
|
|
89
101
|
otherDescription="will help us fund amazing projects in the UK and around the world."
|
|
90
102
|
/>;
|
|
91
103
|
```
|
|
104
|
+
|
|
105
|
+
## Form align right - no subtitle
|
|
106
|
+
|
|
107
|
+
```js
|
|
108
|
+
import data from './dev-data/data';
|
|
109
|
+
const mobilePictures = require('../../../styleguide/data/data').mobileImages;
|
|
110
|
+
const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
111
|
+
|
|
112
|
+
<Donate
|
|
113
|
+
alt="Background image"
|
|
114
|
+
backgroundColor="blue_dark"
|
|
115
|
+
formAlignRight={true}
|
|
116
|
+
imageLow={desktopPictures.imageLow}
|
|
117
|
+
images={desktopPictures.images}
|
|
118
|
+
mobileImageLow={mobilePictures.imageLow}
|
|
119
|
+
mobileImages={mobilePictures.images}
|
|
120
|
+
data={data}
|
|
121
|
+
mbshipID="mship-1"
|
|
122
|
+
donateLink="https://donation.comicrelief.com/"
|
|
123
|
+
clientID="donate"
|
|
124
|
+
cartID="default-comicrelief"
|
|
125
|
+
title="Donate Now"
|
|
126
|
+
subtitle=""
|
|
127
|
+
otherDescription="will help us fund amazing projects in the UK and around the world."
|
|
128
|
+
/>;
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Form align left - no subtitle
|
|
132
|
+
|
|
133
|
+
```js
|
|
134
|
+
import data from './dev-data/data';
|
|
135
|
+
const mobilePictures = require('../../../styleguide/data/data').mobileImages;
|
|
136
|
+
const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
137
|
+
|
|
138
|
+
<Donate
|
|
139
|
+
backgroundColor="blue_dark"
|
|
140
|
+
formAlignRight={false}
|
|
141
|
+
imageLow={desktopPictures.imageLow}
|
|
142
|
+
images={desktopPictures.images}
|
|
143
|
+
mobileImageLow={mobilePictures.imageLow}
|
|
144
|
+
mobileImages={mobilePictures.images}
|
|
145
|
+
data={data}
|
|
146
|
+
mbshipID="mship-1"
|
|
147
|
+
donateLink="https://donation.comicrelief.com/"
|
|
148
|
+
clientID="donate"
|
|
149
|
+
cartID="default-comicrelief"
|
|
150
|
+
title="Donate Now"
|
|
151
|
+
subtitle=""
|
|
152
|
+
otherDescription="will help us fund amazing projects in the UK and around the world."
|
|
153
|
+
/>;
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## Single Giving - no subtitle
|
|
157
|
+
|
|
158
|
+
```js
|
|
159
|
+
import data from './dev-data/data-single';
|
|
160
|
+
const mobilePictures = require('../../../styleguide/data/data').mobileImages;
|
|
161
|
+
const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
162
|
+
|
|
163
|
+
<Donate
|
|
164
|
+
backgroundColor="blue_dark"
|
|
165
|
+
formAlignRight={false}
|
|
166
|
+
imageLow={desktopPictures.imageLow}
|
|
167
|
+
images={desktopPictures.images}
|
|
168
|
+
mobileImageLow={mobilePictures.imageLow}
|
|
169
|
+
mobileImages={mobilePictures.images}
|
|
170
|
+
data={data}
|
|
171
|
+
mbshipID="mship-1"
|
|
172
|
+
donateLink="https://donation.comicrelief.com/"
|
|
173
|
+
clientID="donate"
|
|
174
|
+
cartID="default-comicrelief"
|
|
175
|
+
title="Donate Now"
|
|
176
|
+
subtitle=""
|
|
177
|
+
otherDescription="will help us fund amazing projects in the UK and around the world."
|
|
178
|
+
/>;
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## Single Giving "No Money Buys"
|
|
182
|
+
|
|
183
|
+
```js
|
|
184
|
+
import data from './dev-data/data-single';
|
|
185
|
+
const mobilePictures = require('../../../styleguide/data/data').mobileImages;
|
|
186
|
+
const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
187
|
+
|
|
188
|
+
<Donate
|
|
189
|
+
backgroundColor="blue_dark"
|
|
190
|
+
formAlignRight={false}
|
|
191
|
+
imageLow={desktopPictures.imageLow}
|
|
192
|
+
images={desktopPictures.images}
|
|
193
|
+
mobileImageLow={mobilePictures.imageLow}
|
|
194
|
+
mobileImages={mobilePictures.images}
|
|
195
|
+
data={data}
|
|
196
|
+
mbshipID="mship-1"
|
|
197
|
+
donateLink="https://donation.comicrelief.com/"
|
|
198
|
+
clientID="donate"
|
|
199
|
+
cartID="default-comicrelief"
|
|
200
|
+
title="Donate Now"
|
|
201
|
+
noMoneyBuys
|
|
202
|
+
subtitle=""
|
|
203
|
+
otherDescription="will help us fund amazing projects in the UK and around the world."
|
|
204
|
+
/>;
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## Single Giving "No Money Buys", no background image
|
|
208
|
+
|
|
209
|
+
```js
|
|
210
|
+
import data from './dev-data/data-single';
|
|
211
|
+
|
|
212
|
+
<Donate
|
|
213
|
+
backgroundColor="blue_dark"
|
|
214
|
+
formAlignRight={false}
|
|
215
|
+
data={data}
|
|
216
|
+
mbshipID="mship-1"
|
|
217
|
+
donateLink="https://donation.comicrelief.com/"
|
|
218
|
+
clientID="donate"
|
|
219
|
+
cartID="default-comicrelief"
|
|
220
|
+
title="Donate Now"
|
|
221
|
+
noMoneyBuys
|
|
222
|
+
subtitle=""
|
|
223
|
+
otherDescription="will help us fund amazing projects in the UK and around the world."
|
|
224
|
+
/>;
|
|
225
|
+
```
|