@comicrelief/component-library 6.4.0 → 6.4.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/dist/components/Organisms/Donate/Donate.js +4 -2
- package/dist/components/Organisms/Donate/Donate.md +2 -2
- package/dist/components/Organisms/Donate/Donate.style.js +44 -46
- package/dist/components/Organisms/Donate/Form/PopUpComponent.js +8 -5
- package/dist/components/Organisms/Donate/__snapshots__/Donate.test.js.snap +12 -4
- package/dist/theme/crTheme/colors.js +2 -1
- package/package.json +1 -1
- package/src/components/Organisms/Donate/Donate.js +3 -3
- package/src/components/Organisms/Donate/Donate.md +2 -2
- package/src/components/Organisms/Donate/Donate.style.js +3 -5
- package/src/components/Organisms/Donate/Form/PopUpComponent.js +11 -4
- package/src/components/Organisms/Donate/__snapshots__/Donate.test.js.snap +12 -4
- package/src/theme/crTheme/colors.js +2 -1
|
@@ -15,6 +15,8 @@ var _size = require("../../../theme/shared/size");
|
|
|
15
15
|
|
|
16
16
|
var _Text = _interopRequireDefault(require("../../Atoms/Text/Text"));
|
|
17
17
|
|
|
18
|
+
var _Picture = _interopRequireDefault(require("../../Atoms/Picture/Picture"));
|
|
19
|
+
|
|
18
20
|
var _Form = _interopRequireDefault(require("./Form/Form"));
|
|
19
21
|
|
|
20
22
|
var _Donate = require("./Donate.style");
|
|
@@ -47,7 +49,7 @@ var Donate = function Donate(_ref) {
|
|
|
47
49
|
return /*#__PURE__*/_react.default.createElement(_Donate.Container, {
|
|
48
50
|
backgroundColor: backgroundColor,
|
|
49
51
|
id: mbshipID
|
|
50
|
-
}, !isDesktop && mobileImages ? /*#__PURE__*/_react.default.createElement(
|
|
52
|
+
}, !isDesktop && mobileImages ? /*#__PURE__*/_react.default.createElement(_Picture.default, {
|
|
51
53
|
backgroundColor: backgroundColor,
|
|
52
54
|
image: mobileImage,
|
|
53
55
|
images: mobileImages,
|
|
@@ -110,7 +112,7 @@ Donate.defaultProps = {
|
|
|
110
112
|
otherDescription: 'will help us fund amazing projects in the UK and around the world.',
|
|
111
113
|
subtitle: '',
|
|
112
114
|
noMoneyBuys: false,
|
|
113
|
-
PopUpText:
|
|
115
|
+
PopUpText: 'Help us deliver long-term impact by converting your single donation into a monthly gift.',
|
|
114
116
|
chooseAmountText: ''
|
|
115
117
|
};
|
|
116
118
|
var _default = Donate;
|
|
@@ -111,7 +111,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
111
111
|
|
|
112
112
|
<Donate
|
|
113
113
|
alt="Background image"
|
|
114
|
-
backgroundColor="
|
|
114
|
+
backgroundColor="transparent"
|
|
115
115
|
formAlignRight={true}
|
|
116
116
|
imageLow={desktopPictures.imageLow}
|
|
117
117
|
images={desktopPictures.images}
|
|
@@ -136,7 +136,7 @@ const mobilePictures = require('../../../styleguide/data/data').mobileImages;
|
|
|
136
136
|
const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
137
137
|
|
|
138
138
|
<Donate
|
|
139
|
-
backgroundColor="
|
|
139
|
+
backgroundColor="transparent"
|
|
140
140
|
formAlignRight={false}
|
|
141
141
|
imageLow={desktopPictures.imageLow}
|
|
142
142
|
images={desktopPictures.images}
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.Legend = exports.OuterFieldset = exports.AmountField = exports.MoneyBuys = exports.Form = exports.Wrapper = exports.Label = exports.HeaderInner = exports.Header = exports.FormWrapper = exports.FormFieldset = exports.Error = exports.PopUp = exports.Container = exports.Copy = exports.Button = exports.
|
|
8
|
+
exports.Legend = exports.OuterFieldset = exports.AmountField = exports.MoneyBuys = exports.Form = exports.Wrapper = exports.Label = exports.HeaderInner = exports.Header = exports.FormWrapper = exports.FormFieldset = exports.Error = exports.PopUp = exports.Container = exports.Copy = exports.Button = exports.BgImage = void 0;
|
|
9
9
|
|
|
10
10
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
11
|
|
|
@@ -42,22 +42,20 @@ var PopUp = _styledComponents.default.div.withConfig({
|
|
|
42
42
|
})(["background:green;height:100px;"]);
|
|
43
43
|
|
|
44
44
|
exports.PopUp = PopUp;
|
|
45
|
-
var MobImage = (0, _styledComponents.default)(_Picture.default).withConfig({
|
|
46
|
-
displayName: "Donatestyle__MobImage",
|
|
47
|
-
componentId: "sc-8rjm3t-2"
|
|
48
|
-
})([""]);
|
|
49
|
-
exports.MobImage = MobImage;
|
|
50
45
|
var BgImage = (0, _styledComponents.default)(_Picture.default).withConfig({
|
|
51
46
|
displayName: "Donatestyle__BgImage",
|
|
52
|
-
componentId: "sc-8rjm3t-
|
|
53
|
-
})(["display:block;position:absolute;bottom:0;left:0;right:0;height:100%;
|
|
47
|
+
componentId: "sc-8rjm3t-2"
|
|
48
|
+
})(["display:block;position:absolute;bottom:0;left:0;right:0;height:100%;", ""], function (_ref3) {
|
|
49
|
+
var backgroundColor = _ref3.backgroundColor;
|
|
50
|
+
return backgroundColor !== 'transparent' && "\n opacity: 0.4;\n ";
|
|
51
|
+
});
|
|
54
52
|
exports.BgImage = BgImage;
|
|
55
53
|
|
|
56
54
|
var Wrapper = _styledComponents.default.div.withConfig({
|
|
57
55
|
displayName: "Donatestyle__Wrapper",
|
|
58
|
-
componentId: "sc-8rjm3t-
|
|
59
|
-
})(["position:relative;text-align:center;padding:", " ", ";flex-direction:row;align-items:center;display:block;width:100%;flex-direction:", ";", "{padding:", " ", ";}", "{display:flex;padding:", " 0;}"], (0, _spacing.default)('l'), (0, _spacing.default)('md'), function (
|
|
60
|
-
var formAlignRight =
|
|
56
|
+
componentId: "sc-8rjm3t-3"
|
|
57
|
+
})(["position:relative;text-align:center;padding:", " ", ";flex-direction:row;align-items:center;display:block;width:100%;flex-direction:", ";", "{padding:", " ", ";}", "{display:flex;padding:", " 0;}"], (0, _spacing.default)('l'), (0, _spacing.default)('md'), function (_ref4) {
|
|
58
|
+
var formAlignRight = _ref4.formAlignRight;
|
|
61
59
|
return formAlignRight === true ? 'row-reverse' : 'row';
|
|
62
60
|
}, (0, _size.media)('small'), (0, _spacing.default)('xl'), (0, _spacing.default)('md'), (0, _size.media)('medium'), (0, _spacing.default)('xl'));
|
|
63
61
|
|
|
@@ -65,9 +63,9 @@ exports.Wrapper = Wrapper;
|
|
|
65
63
|
|
|
66
64
|
var Header = _styledComponents.default.div.withConfig({
|
|
67
65
|
displayName: "Donatestyle__Header",
|
|
68
|
-
componentId: "sc-8rjm3t-
|
|
69
|
-
})(["width:100%;display:flex;font-family:", ";", "{width:50%;padding:", ";align-items:center;}"], function (
|
|
70
|
-
var theme =
|
|
66
|
+
componentId: "sc-8rjm3t-4"
|
|
67
|
+
})(["width:100%;display:flex;font-family:", ";", "{width:50%;padding:", ";align-items:center;}"], function (_ref5) {
|
|
68
|
+
var theme = _ref5.theme;
|
|
71
69
|
return theme.fontFamilies(theme.font.regular);
|
|
72
70
|
}, (0, _size.media)('medium'), (0, _spacing.default)('xl'));
|
|
73
71
|
|
|
@@ -75,37 +73,37 @@ exports.Header = Header;
|
|
|
75
73
|
|
|
76
74
|
var HeaderInner = _styledComponents.default.div.withConfig({
|
|
77
75
|
displayName: "Donatestyle__HeaderInner",
|
|
78
|
-
componentId: "sc-8rjm3t-
|
|
76
|
+
componentId: "sc-8rjm3t-5"
|
|
79
77
|
})(["position:relative;text-align:left;"]);
|
|
80
78
|
|
|
81
79
|
exports.HeaderInner = HeaderInner;
|
|
82
80
|
|
|
83
81
|
var FormWrapper = _styledComponents.default.div.withConfig({
|
|
84
82
|
displayName: "Donatestyle__FormWrapper",
|
|
85
|
-
componentId: "sc-8rjm3t-
|
|
86
|
-
})(["position:relative;font-family:", ";", "{width:50%;}"], function (
|
|
87
|
-
var theme =
|
|
83
|
+
componentId: "sc-8rjm3t-6"
|
|
84
|
+
})(["position:relative;font-family:", ";", "{width:50%;}"], function (_ref6) {
|
|
85
|
+
var theme = _ref6.theme;
|
|
88
86
|
return theme.fontFamilies(theme.font.regular);
|
|
89
87
|
}, (0, _size.media)('medium'));
|
|
90
88
|
|
|
91
89
|
exports.FormWrapper = FormWrapper;
|
|
92
90
|
var Error = (0, _styledComponents.default)(_Text.default).withConfig({
|
|
93
91
|
displayName: "Donatestyle__Error",
|
|
94
|
-
componentId: "sc-8rjm3t-
|
|
95
|
-
})(["color:", ";font-size:", ";font-weight:500;margin-top:", ";"], function (
|
|
96
|
-
var theme = _ref6.theme;
|
|
97
|
-
return theme.color('red');
|
|
98
|
-
}, function (_ref7) {
|
|
92
|
+
componentId: "sc-8rjm3t-7"
|
|
93
|
+
})(["color:", ";font-size:", ";font-weight:500;margin-top:", ";"], function (_ref7) {
|
|
99
94
|
var theme = _ref7.theme;
|
|
95
|
+
return theme.color('red');
|
|
96
|
+
}, function (_ref8) {
|
|
97
|
+
var theme = _ref8.theme;
|
|
100
98
|
return theme.fontSize('s');
|
|
101
99
|
}, (0, _spacing.default)('l'));
|
|
102
100
|
exports.Error = Error;
|
|
103
101
|
|
|
104
102
|
var Form = _styledComponents.default.form.withConfig({
|
|
105
103
|
displayName: "Donatestyle__Form",
|
|
106
|
-
componentId: "sc-8rjm3t-
|
|
107
|
-
})(["position:relative;width:100%;background-color:", ";box-shadow:0px 0px 16px rgba(0,0,0,0.15);border-radius:10px;margin-top:", ";h3{margin-top:", ";}input{max-width:100%;margin:0;}input[type='submit']{margin:", " 0;}", "{width:450px;margin-right:auto;margin-left:auto;}"], function (
|
|
108
|
-
var theme =
|
|
104
|
+
componentId: "sc-8rjm3t-8"
|
|
105
|
+
})(["position:relative;width:100%;background-color:", ";box-shadow:0px 0px 16px rgba(0,0,0,0.15);border-radius:10px;margin-top:", ";h3{margin-top:", ";}input{max-width:100%;margin:0;}input[type='submit']{margin:", " 0;}", "{width:450px;margin-right:auto;margin-left:auto;}"], function (_ref9) {
|
|
106
|
+
var theme = _ref9.theme;
|
|
109
107
|
return theme.color('white');
|
|
110
108
|
}, (0, _spacing.default)('md'), (0, _spacing.default)('md'), (0, _spacing.default)('l'), (0, _size.media)('small'));
|
|
111
109
|
|
|
@@ -113,70 +111,70 @@ exports.Form = Form;
|
|
|
113
111
|
|
|
114
112
|
var OuterFieldset = _styledComponents.default.fieldset.withConfig({
|
|
115
113
|
displayName: "Donatestyle__OuterFieldset",
|
|
116
|
-
componentId: "sc-8rjm3t-
|
|
114
|
+
componentId: "sc-8rjm3t-9"
|
|
117
115
|
})(["padding:0 ", " ", ";margin:0;border:none;", "{padding:0 ", " ", ";}input[type='submit']{margin-bottom:0;}"], (0, _spacing.default)('md'), (0, _spacing.default)('md'), (0, _size.media)('small'), (0, _spacing.default)('l'), (0, _spacing.default)('l'));
|
|
118
116
|
|
|
119
117
|
exports.OuterFieldset = OuterFieldset;
|
|
120
118
|
|
|
121
119
|
var Legend = _styledComponents.default.legend.withConfig({
|
|
122
120
|
displayName: "Donatestyle__Legend",
|
|
123
|
-
componentId: "sc-8rjm3t-
|
|
121
|
+
componentId: "sc-8rjm3t-10"
|
|
124
122
|
})(["margin:0;padding:", " ", ";display:block;width:100%;"], (0, _spacing.default)('l'), (0, _spacing.default)('sm'));
|
|
125
123
|
|
|
126
124
|
exports.Legend = Legend;
|
|
127
125
|
|
|
128
126
|
var MoneyBuys = _styledComponents.default.div.withConfig({
|
|
129
127
|
displayName: "Donatestyle__MoneyBuys",
|
|
130
|
-
componentId: "sc-8rjm3t-
|
|
128
|
+
componentId: "sc-8rjm3t-11"
|
|
131
129
|
})(["display:flex;justify-content:space-between;flex-direction:column;margin-bottom:", ";", "{flex-direction:row;}label{flex:0 0 30%;margin-bottom:", ";", "{margin-bottom:0;}input{cursor:pointer;}}"], (0, _spacing.default)('l'), (0, _size.media)('small'), (0, _spacing.default)('sm'), (0, _size.media)('small'));
|
|
132
130
|
|
|
133
131
|
exports.MoneyBuys = MoneyBuys;
|
|
134
132
|
|
|
135
133
|
var FormFieldset = _styledComponents.default.div.withConfig({
|
|
136
134
|
displayName: "Donatestyle__FormFieldset",
|
|
137
|
-
componentId: "sc-8rjm3t-
|
|
135
|
+
componentId: "sc-8rjm3t-12"
|
|
138
136
|
})(["display:flex;align-items:center;justify-content:center;"]);
|
|
139
137
|
|
|
140
138
|
exports.FormFieldset = FormFieldset;
|
|
141
139
|
var Label = (0, _styledComponents.default)(_Text.default).withConfig({
|
|
142
140
|
displayName: "Donatestyle__Label",
|
|
143
|
-
componentId: "sc-8rjm3t-
|
|
141
|
+
componentId: "sc-8rjm3t-13"
|
|
144
142
|
})(["margin-right:", ";"], (0, _spacing.default)('sm'));
|
|
145
143
|
exports.Label = Label;
|
|
146
144
|
var AmountField = (0, _styledComponents.default)(_Input.default).withConfig({
|
|
147
145
|
displayName: "Donatestyle__AmountField",
|
|
148
|
-
componentId: "sc-8rjm3t-
|
|
149
|
-
})(["position:relative;flex-basis:50%;flex-shrink:0;flex-grow:0;font-weight:400;display:block;", "{flex-basis:60%;}span{position:absolute;font-size:20px;top:50%;transform:translateY(-50%);left:0px;font-weight:500;padding:0px 15px;", ";}input{height:48px;border:2px solid ", ";background:", ";border-radius:10px;padding:", " ", " ", " ", ";&:focus{outline:none;border:2px solid ", ";}}"], (0, _size.media)('small'), (0, _zIndex.default)('high'), function (
|
|
150
|
-
var theme = _ref9.theme;
|
|
151
|
-
return theme.color('grey');
|
|
152
|
-
}, function (_ref10) {
|
|
146
|
+
componentId: "sc-8rjm3t-14"
|
|
147
|
+
})(["position:relative;flex-basis:50%;flex-shrink:0;flex-grow:0;font-weight:400;display:block;", "{flex-basis:60%;}span{position:absolute;font-size:20px;top:50%;transform:translateY(-50%);left:0px;font-weight:500;padding:0px 15px;", ";}input{height:48px;border:2px solid ", ";background:", ";border-radius:10px;padding:", " ", " ", " ", ";&:focus{outline:none;border:2px solid ", ";}}"], (0, _size.media)('small'), (0, _zIndex.default)('high'), function (_ref10) {
|
|
153
148
|
var theme = _ref10.theme;
|
|
154
|
-
return theme.color('
|
|
155
|
-
},
|
|
149
|
+
return theme.color('grey');
|
|
150
|
+
}, function (_ref11) {
|
|
156
151
|
var theme = _ref11.theme;
|
|
152
|
+
return theme.color('grey_light');
|
|
153
|
+
}, (0, _spacing.default)('sm'), (0, _spacing.default)('md'), (0, _spacing.default)('sm'), (0, _spacing.default)('l'), function (_ref12) {
|
|
154
|
+
var theme = _ref12.theme;
|
|
157
155
|
return theme.color('grey');
|
|
158
156
|
});
|
|
159
157
|
exports.AmountField = AmountField;
|
|
160
158
|
var Copy = (0, _styledComponents.default)(_Text.default).withConfig({
|
|
161
159
|
displayName: "Donatestyle__Copy",
|
|
162
|
-
componentId: "sc-8rjm3t-
|
|
160
|
+
componentId: "sc-8rjm3t-15"
|
|
163
161
|
})(["line-height:1.5;margin-top:", ";"], (0, _spacing.default)('l'));
|
|
164
162
|
exports.Copy = Copy;
|
|
165
163
|
|
|
166
164
|
var Button = _styledComponents.default.button.withConfig({
|
|
167
165
|
displayName: "Donatestyle__Button",
|
|
168
|
-
componentId: "sc-8rjm3t-
|
|
169
|
-
})(["width:100%;margin:", " 0 ", ";color:", ";font-size:", ";font-weight:bold;cursor:pointer;min-height:48px;background:", ";text-decoration:none;border-radius:2rem;border:none;box-shadow:0px 0px 16px rgba(0,0,0,0.15);appearance:none;:active,:focus,:hover{outline:none;background-color:", ";}", "{padding:", " ", ";}"], (0, _spacing.default)('l'), (0, _spacing.default)('l'), function (
|
|
170
|
-
var theme = _ref12.theme;
|
|
171
|
-
return theme.color('white');
|
|
172
|
-
}, function (_ref13) {
|
|
166
|
+
componentId: "sc-8rjm3t-16"
|
|
167
|
+
})(["width:100%;margin:", " 0 ", ";color:", ";font-size:", ";font-weight:bold;cursor:pointer;min-height:48px;background:", ";text-decoration:none;border-radius:2rem;border:none;box-shadow:0px 0px 16px rgba(0,0,0,0.15);appearance:none;:active,:focus,:hover{outline:none;background-color:", ";}", "{padding:", " ", ";}"], (0, _spacing.default)('l'), (0, _spacing.default)('l'), function (_ref13) {
|
|
173
168
|
var theme = _ref13.theme;
|
|
174
|
-
return theme.
|
|
169
|
+
return theme.color('white');
|
|
175
170
|
}, function (_ref14) {
|
|
176
171
|
var theme = _ref14.theme;
|
|
177
|
-
return theme.
|
|
172
|
+
return theme.fontSize('s');
|
|
178
173
|
}, function (_ref15) {
|
|
179
174
|
var theme = _ref15.theme;
|
|
175
|
+
return theme.color('red');
|
|
176
|
+
}, function (_ref16) {
|
|
177
|
+
var theme = _ref16.theme;
|
|
180
178
|
return theme.color('coral_dark');
|
|
181
179
|
}, (0, _size.media)('small'), (0, _spacing.default)('md'), (0, _spacing.default)('l'));
|
|
182
180
|
|
|
@@ -29,9 +29,9 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
29
29
|
var StyledPopUp = _styledComponents.default.div.withConfig({
|
|
30
30
|
displayName: "PopUpComponent__StyledPopUp",
|
|
31
31
|
componentId: "sc-1d7imlo-0"
|
|
32
|
-
})(["display:", ";
|
|
32
|
+
})(["display:", ";background-color:", ";box-shadow:0px 0px 16px rgba(0,0,0,0.15);border-radius:8px;", "{width:450px;margin-right:auto;margin-left:auto;}"], function (props) {
|
|
33
33
|
return props.isPop ? "grid" : "none";
|
|
34
|
-
},
|
|
34
|
+
}, function (_ref) {
|
|
35
35
|
var theme = _ref.theme;
|
|
36
36
|
return theme.color('white');
|
|
37
37
|
}, (0, _size.media)('small'));
|
|
@@ -44,13 +44,16 @@ var TextWrapper = _styledComponents.default.div.withConfig({
|
|
|
44
44
|
var Button = _styledComponents.default.button.withConfig({
|
|
45
45
|
displayName: "PopUpComponent__Button",
|
|
46
46
|
componentId: "sc-1d7imlo-2"
|
|
47
|
-
})(["justify-self:end;background:transparent;border:0;cursor:pointer;:active,:focus,:hover{outline:none;border:1px solid ", ";}margin:
|
|
47
|
+
})(["justify-self:end;background:transparent;border:0;cursor:pointer;border:1px solid ", ";:active,:focus,:hover{outline:none;border:1px solid ", ";}margin:8px;width:35px;height:35px;padding:5px;img{width:15px;height:15px;vertical-align:middle;}"], function (_ref2) {
|
|
48
48
|
var theme = _ref2.theme;
|
|
49
|
+
return theme.color('white');
|
|
50
|
+
}, function (_ref3) {
|
|
51
|
+
var theme = _ref3.theme;
|
|
49
52
|
return theme.color('grey');
|
|
50
53
|
});
|
|
51
54
|
|
|
52
|
-
var PopUpComponent = function PopUpComponent(
|
|
53
|
-
var PopUpText =
|
|
55
|
+
var PopUpComponent = function PopUpComponent(_ref4) {
|
|
56
|
+
var PopUpText = _ref4.PopUpText;
|
|
54
57
|
|
|
55
58
|
var _useState = (0, _react.useState)(true),
|
|
56
59
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -107,7 +107,6 @@ exports[`Monthly donation renders correctly 1`] = `
|
|
|
107
107
|
|
|
108
108
|
.c13 {
|
|
109
109
|
display: grid;
|
|
110
|
-
gap: 0.5rem;
|
|
111
110
|
background-color: #FFFFFF;
|
|
112
111
|
box-shadow: 0px 0px 16px rgba(0,0,0,0.15);
|
|
113
112
|
border-radius: 8px;
|
|
@@ -122,8 +121,11 @@ exports[`Monthly donation renders correctly 1`] = `
|
|
|
122
121
|
background: transparent;
|
|
123
122
|
border: 0;
|
|
124
123
|
cursor: pointer;
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
border: 1px solid #FFFFFF;
|
|
125
|
+
margin: 8px;
|
|
126
|
+
width: 35px;
|
|
127
|
+
height: 35px;
|
|
128
|
+
padding: 5px;
|
|
127
129
|
}
|
|
128
130
|
|
|
129
131
|
.c14:active,
|
|
@@ -133,6 +135,12 @@ exports[`Monthly donation renders correctly 1`] = `
|
|
|
133
135
|
border: 1px solid #969598;
|
|
134
136
|
}
|
|
135
137
|
|
|
138
|
+
.c14 img {
|
|
139
|
+
width: 15px;
|
|
140
|
+
height: 15px;
|
|
141
|
+
vertical-align: middle;
|
|
142
|
+
}
|
|
143
|
+
|
|
136
144
|
.c23 {
|
|
137
145
|
display: block;
|
|
138
146
|
}
|
|
@@ -742,7 +750,7 @@ exports[`Monthly donation renders correctly 1`] = `
|
|
|
742
750
|
color="inherit"
|
|
743
751
|
size="s"
|
|
744
752
|
>
|
|
745
|
-
|
|
753
|
+
Help us deliver long-term impact by converting your single donation into a monthly gift.
|
|
746
754
|
</span>
|
|
747
755
|
</div>
|
|
748
756
|
</div>
|
package/package.json
CHANGED
|
@@ -4,9 +4,9 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
|
|
5
5
|
import { screen } from '../../../theme/shared/size';
|
|
6
6
|
import Text from '../../Atoms/Text/Text';
|
|
7
|
+
import Picture from '../../Atoms/Picture/Picture';
|
|
7
8
|
import Form from './Form/Form';
|
|
8
9
|
import {
|
|
9
|
-
MobImage,
|
|
10
10
|
BgImage,
|
|
11
11
|
Container,
|
|
12
12
|
Header,
|
|
@@ -42,7 +42,7 @@ const Donate = ({
|
|
|
42
42
|
return (
|
|
43
43
|
<Container backgroundColor={backgroundColor} id={mbshipID}>
|
|
44
44
|
{!isDesktop && mobileImages ? (
|
|
45
|
-
<
|
|
45
|
+
<Picture
|
|
46
46
|
backgroundColor={backgroundColor}
|
|
47
47
|
image={mobileImage}
|
|
48
48
|
images={mobileImages}
|
|
@@ -148,7 +148,7 @@ Donate.defaultProps = {
|
|
|
148
148
|
'will help us fund amazing projects in the UK and around the world.',
|
|
149
149
|
subtitle: '',
|
|
150
150
|
noMoneyBuys: false,
|
|
151
|
-
PopUpText:
|
|
151
|
+
PopUpText: 'Help us deliver long-term impact by converting your single donation into a monthly gift.',
|
|
152
152
|
chooseAmountText: ''
|
|
153
153
|
};
|
|
154
154
|
|
|
@@ -111,7 +111,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
111
111
|
|
|
112
112
|
<Donate
|
|
113
113
|
alt="Background image"
|
|
114
|
-
backgroundColor="
|
|
114
|
+
backgroundColor="transparent"
|
|
115
115
|
formAlignRight={true}
|
|
116
116
|
imageLow={desktopPictures.imageLow}
|
|
117
117
|
images={desktopPictures.images}
|
|
@@ -136,7 +136,7 @@ const mobilePictures = require('../../../styleguide/data/data').mobileImages;
|
|
|
136
136
|
const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
137
137
|
|
|
138
138
|
<Donate
|
|
139
|
-
backgroundColor="
|
|
139
|
+
backgroundColor="transparent"
|
|
140
140
|
formAlignRight={false}
|
|
141
141
|
imageLow={desktopPictures.imageLow}
|
|
142
142
|
images={desktopPictures.images}
|
|
@@ -28,9 +28,6 @@ const PopUp = styled.div`
|
|
|
28
28
|
height: 100px;
|
|
29
29
|
`;
|
|
30
30
|
|
|
31
|
-
const MobImage = styled(Picture)`
|
|
32
|
-
`;
|
|
33
|
-
|
|
34
31
|
const BgImage = styled(Picture)`
|
|
35
32
|
display: block;
|
|
36
33
|
position: absolute;
|
|
@@ -38,7 +35,9 @@ const BgImage = styled(Picture)`
|
|
|
38
35
|
left: 0;
|
|
39
36
|
right: 0;
|
|
40
37
|
height: 100%;
|
|
41
|
-
|
|
38
|
+
${({ backgroundColor }) => backgroundColor !== 'transparent' && `
|
|
39
|
+
opacity: 0.4;
|
|
40
|
+
`}
|
|
42
41
|
`;
|
|
43
42
|
|
|
44
43
|
const Wrapper = styled.div`
|
|
@@ -236,7 +235,6 @@ const Button = styled.button`
|
|
|
236
235
|
|
|
237
236
|
export {
|
|
238
237
|
BgImage,
|
|
239
|
-
MobImage,
|
|
240
238
|
Button,
|
|
241
239
|
Copy,
|
|
242
240
|
Container,
|
|
@@ -9,7 +9,6 @@ import CloseCross from '../assets/close.svg';
|
|
|
9
9
|
|
|
10
10
|
const StyledPopUp = styled.div`
|
|
11
11
|
display: ${props => props.isPop ? "grid" : "none"};
|
|
12
|
-
gap: ${spacing('sm')};
|
|
13
12
|
background-color: ${({ theme }) => theme.color('white')};
|
|
14
13
|
box-shadow: 0px 0px 16px rgba(0, 0, 0, 0.15);
|
|
15
14
|
border-radius: 8px;
|
|
@@ -30,15 +29,23 @@ const Button = styled.button`
|
|
|
30
29
|
background: transparent;
|
|
31
30
|
border: 0;
|
|
32
31
|
cursor: pointer;
|
|
32
|
+
border: 1px solid ${({ theme }) => theme.color('white')};
|
|
33
33
|
:active,
|
|
34
34
|
:focus,
|
|
35
35
|
:hover {
|
|
36
36
|
outline: none;
|
|
37
37
|
border: 1px solid ${({ theme }) => theme.color('grey')};
|
|
38
38
|
}
|
|
39
|
-
margin:
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
margin: 8px;
|
|
40
|
+
width: 35px;
|
|
41
|
+
height: 35px;
|
|
42
|
+
padding: 5px;
|
|
43
|
+
|
|
44
|
+
img {
|
|
45
|
+
width: 15px;
|
|
46
|
+
height: 15px;
|
|
47
|
+
vertical-align: middle;
|
|
48
|
+
}
|
|
42
49
|
`;
|
|
43
50
|
|
|
44
51
|
const PopUpComponent = ({ PopUpText }) => {
|
|
@@ -107,7 +107,6 @@ exports[`Monthly donation renders correctly 1`] = `
|
|
|
107
107
|
|
|
108
108
|
.c13 {
|
|
109
109
|
display: grid;
|
|
110
|
-
gap: 0.5rem;
|
|
111
110
|
background-color: #FFFFFF;
|
|
112
111
|
box-shadow: 0px 0px 16px rgba(0,0,0,0.15);
|
|
113
112
|
border-radius: 8px;
|
|
@@ -122,8 +121,11 @@ exports[`Monthly donation renders correctly 1`] = `
|
|
|
122
121
|
background: transparent;
|
|
123
122
|
border: 0;
|
|
124
123
|
cursor: pointer;
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
border: 1px solid #FFFFFF;
|
|
125
|
+
margin: 8px;
|
|
126
|
+
width: 35px;
|
|
127
|
+
height: 35px;
|
|
128
|
+
padding: 5px;
|
|
127
129
|
}
|
|
128
130
|
|
|
129
131
|
.c14:active,
|
|
@@ -133,6 +135,12 @@ exports[`Monthly donation renders correctly 1`] = `
|
|
|
133
135
|
border: 1px solid #969598;
|
|
134
136
|
}
|
|
135
137
|
|
|
138
|
+
.c14 img {
|
|
139
|
+
width: 15px;
|
|
140
|
+
height: 15px;
|
|
141
|
+
vertical-align: middle;
|
|
142
|
+
}
|
|
143
|
+
|
|
136
144
|
.c23 {
|
|
137
145
|
display: block;
|
|
138
146
|
}
|
|
@@ -742,7 +750,7 @@ exports[`Monthly donation renders correctly 1`] = `
|
|
|
742
750
|
color="inherit"
|
|
743
751
|
size="s"
|
|
744
752
|
>
|
|
745
|
-
|
|
753
|
+
Help us deliver long-term impact by converting your single donation into a monthly gift.
|
|
746
754
|
</span>
|
|
747
755
|
</div>
|
|
748
756
|
</div>
|