@comicrelief/component-library 8.1.1 → 8.2.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/.eslintrc +1 -0
- package/dist/components/Atoms/Button/Button.js +3 -7
- package/dist/components/Atoms/ButtonWithStates/ButtonWithStates.js +3 -8
- package/dist/components/Atoms/Checkbox/Checkbox.js +2 -6
- package/dist/components/Atoms/Confetti/Confetti.js +2 -5
- package/dist/components/Atoms/Icons/Arrow.js +4 -10
- package/dist/components/Atoms/Icons/AtSign.js +3 -8
- package/dist/components/Atoms/Icons/Chevron.js +4 -10
- package/dist/components/Atoms/Icons/Download.js +3 -8
- package/dist/components/Atoms/Icons/External.js +3 -8
- package/dist/components/Atoms/Icons/Favourite.js +3 -8
- package/dist/components/Atoms/Icons/Internal.js +3 -8
- package/dist/components/Atoms/Input/Input.js +9 -17
- package/dist/components/Atoms/Label/Label.js +3 -12
- package/dist/components/Atoms/Link/Link.js +9 -18
- package/dist/components/Atoms/Logo/Logo.js +4 -11
- package/dist/components/Atoms/Pagination/Pagination.js +39 -52
- package/dist/components/Atoms/Picture/Picture.js +10 -22
- package/dist/components/Atoms/RichText/RichText.js +2 -6
- package/dist/components/Atoms/Select/Select.js +6 -16
- package/dist/components/Atoms/SocialIcons/SocialIcons.js +2 -3
- package/dist/components/Atoms/Text/Text.js +12 -17
- package/dist/components/Atoms/TextArea/TextArea.js +6 -11
- package/dist/components/Atoms/TextInputWithDropdown/TextInputWithDropdown.js +2 -9
- package/dist/components/Molecules/ArticleTeaser/ArticleTeaser.js +8 -18
- package/dist/components/Molecules/Banner/Banner.js +1 -4
- package/dist/components/Molecules/Box/Box.js +6 -17
- package/dist/components/Molecules/Card/Card.js +11 -24
- package/dist/components/Molecules/CardDs/CardDs.js +11 -24
- package/dist/components/Molecules/Chip/Chip.js +2 -6
- package/dist/components/Molecules/Countdown/Countdown.js +3 -8
- package/dist/components/Molecules/Logos/Logos.js +1 -4
- package/dist/components/Molecules/Lookup/Lookup.js +2 -6
- package/dist/components/Molecules/Promo/Promo.js +17 -36
- package/dist/components/Molecules/SchoolLookup/SchoolLookup.js +4 -10
- package/dist/components/Molecules/SearchInput/SearchInput.js +1 -4
- package/dist/components/Molecules/SearchResult/SearchResult.js +8 -17
- package/dist/components/Molecules/ShareButton/ShareButton.js +3 -8
- package/dist/components/Molecules/SimpleSchoolLookup/SimpleSchoolLookup.js +1 -4
- package/dist/components/Molecules/SingleMessage/SingleMessage.js +15 -32
- package/dist/components/Molecules/SingleMessageDS/SingleMessageDs.js +13 -28
- package/dist/components/Molecules/Typeahead/Typeahead.js +3 -8
- package/dist/components/Molecules/VideoBanner/VideoBanner.js +5 -12
- package/dist/components/Organisms/Donate/Donate.js +31 -65
- package/dist/components/Organisms/Donate/Donate.md +19 -19
- package/dist/components/Organisms/Donate/Form/Form.js +6 -19
- package/dist/components/Organisms/Donate/GivingSelector/GivingSelector.js +1 -4
- package/dist/components/Organisms/Donate/GivingSelector/GivingSelector.style.js +3 -3
- package/dist/components/Organisms/Donate/MoneyBuy/MoneyBuy.js +5 -10
- package/dist/components/Organisms/Donate/__snapshots__/Donate.test.js.snap +10 -10
- package/dist/components/Organisms/EmailSignUp/_EmailSignUp.js +4 -9
- package/dist/components/Organisms/EmailSignUp/_TextInput.js +3 -8
- package/dist/components/Organisms/Footer/Footer.js +6 -11
- package/dist/components/Organisms/Footer/Nav/Nav.js +1 -4
- package/dist/components/Organisms/Header/Header.js +2 -6
- package/dist/components/Organisms/Header/Nav/Nav.js +1 -4
- package/dist/components/Organisms/ImpactSlider/ImpactSlider.js +3 -8
- package/dist/components/Organisms/MarketingPreferencesDS/_CheckAnswer.js +2 -6
- package/dist/components/Organisms/MarketingPreferencesDS/_MarketingPreferencesDS.js +6 -16
- package/dist/components/Organisms/MarketingPreferencesDS/_TextInput.js +3 -8
- package/dist/components/Organisms/Membership/Form/Form.js +1 -5
- package/dist/components/Organisms/Membership/Membership.js +9 -19
- package/dist/components/Organisms/Membership/MoneyBox/MoneyBox.js +3 -8
- package/package.json +1 -1
- package/src/components/Atoms/Button/Button.js +3 -8
- package/src/components/Atoms/ButtonWithStates/ButtonWithStates.js +1 -7
- package/src/components/Atoms/Checkbox/Checkbox.js +1 -6
- package/src/components/Atoms/Confetti/Confetti.js +1 -5
- package/src/components/Atoms/Icons/Arrow.js +1 -8
- package/src/components/Atoms/Icons/AtSign.js +1 -7
- package/src/components/Atoms/Icons/Chevron.js +1 -8
- package/src/components/Atoms/Icons/Download.js +1 -7
- package/src/components/Atoms/Icons/External.js +1 -7
- package/src/components/Atoms/Icons/Favourite.js +1 -7
- package/src/components/Atoms/Icons/Internal.js +1 -7
- package/src/components/Atoms/Input/Input.js +9 -18
- package/src/components/Atoms/Label/Label.js +3 -13
- package/src/components/Atoms/Link/Link.js +9 -19
- package/src/components/Atoms/Logo/Logo.js +1 -8
- package/src/components/Atoms/Pagination/Pagination.js +38 -51
- package/src/components/Atoms/Picture/Picture.js +10 -23
- package/src/components/Atoms/RichText/RichText.js +1 -6
- package/src/components/Atoms/Select/Select.js +6 -17
- package/src/components/Atoms/SocialIcons/SocialIcons.js +2 -5
- package/src/components/Atoms/Text/Text.js +4 -13
- package/src/components/Atoms/TextArea/TextArea.js +2 -9
- package/src/components/Atoms/TextInputWithDropdown/TextInputWithDropdown.js +2 -11
- package/src/components/Molecules/ArticleTeaser/ArticleTeaser.js +8 -19
- package/src/components/Molecules/Banner/Banner.js +1 -5
- package/src/components/Molecules/Box/Box.js +6 -18
- package/src/components/Molecules/Card/Card.js +11 -25
- package/src/components/Molecules/CardDs/CardDs.js +11 -25
- package/src/components/Molecules/Chip/Chip.js +1 -6
- package/src/components/Molecules/Countdown/Countdown.js +1 -7
- package/src/components/Molecules/Logos/Logos.js +1 -5
- package/src/components/Molecules/Lookup/Lookup.js +2 -7
- package/src/components/Molecules/Promo/Promo.js +17 -37
- package/src/components/Molecules/SchoolLookup/SchoolLookup.js +4 -11
- package/src/components/Molecules/SearchInput/SearchInput.js +1 -5
- package/src/components/Molecules/SearchResult/SearchResult.js +8 -18
- package/src/components/Molecules/ShareButton/ShareButton.js +1 -7
- package/src/components/Molecules/SimpleSchoolLookup/SimpleSchoolLookup.js +4 -5
- package/src/components/Molecules/SingleMessage/SingleMessage.js +15 -33
- package/src/components/Molecules/SingleMessageDS/SingleMessageDs.js +13 -29
- package/src/components/Molecules/Typeahead/Typeahead.js +3 -9
- package/src/components/Molecules/VideoBanner/VideoBanner.js +7 -9
- package/src/components/Organisms/Donate/Donate.js +32 -67
- package/src/components/Organisms/Donate/Donate.md +19 -19
- package/src/components/Organisms/Donate/Form/Form.js +6 -22
- package/src/components/Organisms/Donate/GivingSelector/GivingSelector.js +1 -5
- package/src/components/Organisms/Donate/GivingSelector/GivingSelector.style.js +3 -3
- package/src/components/Organisms/Donate/MoneyBuy/MoneyBuy.js +5 -11
- package/src/components/Organisms/Donate/__snapshots__/Donate.test.js.snap +10 -10
- package/src/components/Organisms/EmailSignUp/_EmailSignUp.js +3 -9
- package/src/components/Organisms/EmailSignUp/_TextInput.js +3 -9
- package/src/components/Organisms/Footer/Footer.js +2 -10
- package/src/components/Organisms/Footer/Nav/Nav.js +1 -5
- package/src/components/Organisms/Header/Header.js +1 -6
- package/src/components/Organisms/Header/Nav/Nav.js +1 -5
- package/src/components/Organisms/ImpactSlider/ImpactSlider.js +1 -7
- package/src/components/Organisms/MarketingPreferencesDS/_CheckAnswer.js +1 -6
- package/src/components/Organisms/MarketingPreferencesDS/_MarketingPreferencesDS.js +5 -17
- package/src/components/Organisms/MarketingPreferencesDS/_TextInput.js +1 -7
- package/src/components/Organisms/Membership/Form/Form.js +1 -5
- package/src/components/Organisms/Membership/Membership.js +9 -19
- package/src/components/Organisms/Membership/MoneyBox/MoneyBox.js +3 -9
|
@@ -20,10 +20,10 @@ const optionParser = school => `${school.name}, ${school.post_code}`;
|
|
|
20
20
|
const SchoolLookup = React.forwardRef(
|
|
21
21
|
(
|
|
22
22
|
{
|
|
23
|
-
label,
|
|
24
|
-
placeholder,
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
label = 'Enter the name or postcode of your school or nursery',
|
|
24
|
+
placeholder = 'Type to start search',
|
|
25
|
+
dropdownInstruction = 'Please select a school from the list below',
|
|
26
|
+
notFoundMessage = "Sorry, we can't find this school",
|
|
27
27
|
onSelect,
|
|
28
28
|
...rest
|
|
29
29
|
},
|
|
@@ -55,11 +55,4 @@ SchoolLookup.propTypes = {
|
|
|
55
55
|
notFoundMessage: PropTypes.string
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
-
SchoolLookup.defaultProps = {
|
|
59
|
-
label: 'Enter the name or postcode of your school or nursery',
|
|
60
|
-
placeholder: 'Type to start search',
|
|
61
|
-
dropdownInstruction: 'Please select a school from the list below',
|
|
62
|
-
notFoundMessage: "Sorry, we can't find this school"
|
|
63
|
-
};
|
|
64
|
-
|
|
65
58
|
export default SchoolLookup;
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from './SearchInput.style';
|
|
11
11
|
|
|
12
12
|
const SearchInput = ({
|
|
13
|
-
onChange, placeholder, value, ...rest
|
|
13
|
+
onChange, placeholder = '', value, ...rest
|
|
14
14
|
}) => (
|
|
15
15
|
<Wrapper>
|
|
16
16
|
<InnerWrapper>
|
|
@@ -41,8 +41,4 @@ SearchInput.propTypes = {
|
|
|
41
41
|
value: PropTypes.string.isRequired
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
-
SearchInput.defaultProps = {
|
|
45
|
-
placeholder: ''
|
|
46
|
-
};
|
|
47
|
-
|
|
48
44
|
export default SearchInput;
|
|
@@ -59,16 +59,16 @@ const Title = styled(Text)`
|
|
|
59
59
|
* Search Result component
|
|
60
60
|
*/
|
|
61
61
|
const SearchResult = ({
|
|
62
|
+
imageLow = null,
|
|
63
|
+
images = null,
|
|
64
|
+
type = '',
|
|
65
|
+
date = '',
|
|
66
|
+
copy = '',
|
|
67
|
+
smallImageWidth = '45%',
|
|
68
|
+
largeImageWidth = '100%',
|
|
62
69
|
href,
|
|
63
|
-
date,
|
|
64
70
|
title,
|
|
65
|
-
|
|
66
|
-
type,
|
|
67
|
-
imageLow,
|
|
68
|
-
images,
|
|
69
|
-
alt,
|
|
70
|
-
smallImageWidth,
|
|
71
|
-
largeImageWidth
|
|
71
|
+
alt
|
|
72
72
|
}) => (
|
|
73
73
|
<Wrapper>
|
|
74
74
|
<Item href={href} type="standard">
|
|
@@ -122,14 +122,4 @@ SearchResult.propTypes = {
|
|
|
122
122
|
imageLow: PropTypes.string
|
|
123
123
|
};
|
|
124
124
|
|
|
125
|
-
SearchResult.defaultProps = {
|
|
126
|
-
imageLow: null,
|
|
127
|
-
images: null,
|
|
128
|
-
type: '',
|
|
129
|
-
date: '',
|
|
130
|
-
copy: '',
|
|
131
|
-
smallImageWidth: '45%',
|
|
132
|
-
largeImageWidth: '100%'
|
|
133
|
-
};
|
|
134
|
-
|
|
135
125
|
export default SearchResult;
|
|
@@ -27,7 +27,7 @@ const handleShare = (e, typeOfShare, urlToShare) => {
|
|
|
27
27
|
|
|
28
28
|
/* Share Button component to handle FB and Twitter sharing */
|
|
29
29
|
const ShareButton = ({
|
|
30
|
-
campaign, copy, urlToShare, ...restProps
|
|
30
|
+
campaign = 'comicrelief', copy = 'Share with:', urlToShare = null, ...restProps
|
|
31
31
|
}) => {
|
|
32
32
|
let checkedUrl = '';
|
|
33
33
|
|
|
@@ -70,10 +70,4 @@ ShareButton.propTypes = {
|
|
|
70
70
|
urlToShare: PropTypes.string
|
|
71
71
|
};
|
|
72
72
|
|
|
73
|
-
ShareButton.defaultProps = {
|
|
74
|
-
campaign: 'comicrelief',
|
|
75
|
-
copy: 'Share with:',
|
|
76
|
-
urlToShare: null
|
|
77
|
-
};
|
|
78
|
-
|
|
79
73
|
export default ShareButton;
|
|
@@ -41,7 +41,10 @@ const schoolToString = school => `${school.name}, ${school.post_code}`;
|
|
|
41
41
|
* @returns {JSX.Element}
|
|
42
42
|
* @constructor
|
|
43
43
|
*/
|
|
44
|
-
const SimpleSchoolLookup = ({
|
|
44
|
+
const SimpleSchoolLookup = ({
|
|
45
|
+
onSelect, noResultsMessage = 'Sorry, we could not find anything matching your search; please use the manual entry option.',
|
|
46
|
+
...rest
|
|
47
|
+
}) => (
|
|
45
48
|
<Lookup
|
|
46
49
|
name="school_lookup"
|
|
47
50
|
label="Enter the name or postcode of your organisation"
|
|
@@ -56,10 +59,6 @@ const SimpleSchoolLookup = ({ onSelect, noResultsMessage, ...rest }) => (
|
|
|
56
59
|
/>
|
|
57
60
|
);
|
|
58
61
|
|
|
59
|
-
SimpleSchoolLookup.defaultProps = {
|
|
60
|
-
noResultsMessage: 'Sorry, we could not find anything matching your search; please use the manual entry option.'
|
|
61
|
-
};
|
|
62
|
-
|
|
63
62
|
SimpleSchoolLookup.propTypes = {
|
|
64
63
|
onSelect: PropTypes.func.isRequired,
|
|
65
64
|
noResultsMessage: PropTypes.string
|
|
@@ -17,21 +17,21 @@ const allPlayers = {};
|
|
|
17
17
|
|
|
18
18
|
/* Single Message is our main component usually to build landing pages */
|
|
19
19
|
const SingleMessage = ({
|
|
20
|
-
backgroundColor,
|
|
21
|
-
copyFirst,
|
|
22
|
-
|
|
23
|
-
imageSet,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
vhFull,
|
|
32
|
-
videoID,
|
|
33
|
-
landscapeVideo,
|
|
34
|
-
paddingOption
|
|
20
|
+
backgroundColor = 'white',
|
|
21
|
+
copyFirst = false,
|
|
22
|
+
fullImage = false,
|
|
23
|
+
imageSet = null,
|
|
24
|
+
imageLow = null,
|
|
25
|
+
image = null,
|
|
26
|
+
imageSet2 = null,
|
|
27
|
+
image2 = null,
|
|
28
|
+
imageAltText = '',
|
|
29
|
+
imageAltText2 = '',
|
|
30
|
+
children = null,
|
|
31
|
+
vhFull = false,
|
|
32
|
+
videoID = null,
|
|
33
|
+
landscapeVideo = false,
|
|
34
|
+
paddingOption = null
|
|
35
35
|
}) => {
|
|
36
36
|
const hasImage = imageSet || false;
|
|
37
37
|
const doubleImage = (imageSet || image) && (imageSet2 || image2);
|
|
@@ -240,22 +240,4 @@ SingleMessage.propTypes = {
|
|
|
240
240
|
paddingOption: PropTypes.string
|
|
241
241
|
};
|
|
242
242
|
|
|
243
|
-
SingleMessage.defaultProps = {
|
|
244
|
-
backgroundColor: 'white',
|
|
245
|
-
copyFirst: false,
|
|
246
|
-
fullImage: false,
|
|
247
|
-
imageSet: null,
|
|
248
|
-
imageLow: null,
|
|
249
|
-
image: null,
|
|
250
|
-
imageSet2: null,
|
|
251
|
-
image2: null,
|
|
252
|
-
imageAltText: '',
|
|
253
|
-
imageAltText2: '',
|
|
254
|
-
children: null,
|
|
255
|
-
vhFull: false,
|
|
256
|
-
videoID: null,
|
|
257
|
-
landscapeVideo: false,
|
|
258
|
-
paddingOption: null
|
|
259
|
-
};
|
|
260
|
-
|
|
261
243
|
export default SingleMessage;
|
|
@@ -11,22 +11,22 @@ import {
|
|
|
11
11
|
import playImage from './assets/play.png';
|
|
12
12
|
|
|
13
13
|
const SingleMessageDs = ({
|
|
14
|
-
backgroundColor,
|
|
14
|
+
backgroundColor = 'white',
|
|
15
|
+
imageLow = null,
|
|
16
|
+
images = null,
|
|
17
|
+
image = null,
|
|
18
|
+
link = null,
|
|
19
|
+
ctaBgColor = 'red',
|
|
20
|
+
linkLabel = null,
|
|
21
|
+
target = null,
|
|
22
|
+
imageAltText = '',
|
|
23
|
+
width = '100%',
|
|
24
|
+
height = '100%',
|
|
25
|
+
linkIcon = null,
|
|
26
|
+
youTubeId = null,
|
|
15
27
|
imageLeft,
|
|
16
|
-
imageLow,
|
|
17
|
-
images,
|
|
18
|
-
image,
|
|
19
|
-
imageAltText,
|
|
20
|
-
height,
|
|
21
|
-
width,
|
|
22
28
|
subtitle,
|
|
23
29
|
children,
|
|
24
|
-
link,
|
|
25
|
-
linkLabel,
|
|
26
|
-
ctaBgColor,
|
|
27
|
-
target,
|
|
28
|
-
linkIcon,
|
|
29
|
-
youTubeId,
|
|
30
30
|
...rest
|
|
31
31
|
}) => {
|
|
32
32
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -192,20 +192,4 @@ SingleMessageDs.propTypes = {
|
|
|
192
192
|
youTubeId: PropTypes.string
|
|
193
193
|
};
|
|
194
194
|
|
|
195
|
-
SingleMessageDs.defaultProps = {
|
|
196
|
-
backgroundColor: 'white',
|
|
197
|
-
imageLow: null,
|
|
198
|
-
images: null,
|
|
199
|
-
image: null,
|
|
200
|
-
link: null,
|
|
201
|
-
ctaBgColor: 'red',
|
|
202
|
-
linkLabel: null,
|
|
203
|
-
target: null,
|
|
204
|
-
imageAltText: '',
|
|
205
|
-
width: '100%',
|
|
206
|
-
height: '100%',
|
|
207
|
-
linkIcon: null,
|
|
208
|
-
youTubeId: null
|
|
209
|
-
};
|
|
210
|
-
|
|
211
195
|
export default SingleMessageDs;
|
|
@@ -12,14 +12,14 @@ const Typeahead = React.forwardRef(
|
|
|
12
12
|
(
|
|
13
13
|
{
|
|
14
14
|
optionFetcher,
|
|
15
|
-
optionParser,
|
|
15
|
+
optionParser = null,
|
|
16
16
|
onSelect,
|
|
17
17
|
id,
|
|
18
18
|
label,
|
|
19
19
|
name,
|
|
20
|
-
dropdownInstruction,
|
|
20
|
+
dropdownInstruction = null,
|
|
21
21
|
notFoundMessage,
|
|
22
|
-
fetchErrorHandler,
|
|
22
|
+
fetchErrorHandler = () => 'Sorry, there was an unexpected error. Please try again',
|
|
23
23
|
...rest
|
|
24
24
|
},
|
|
25
25
|
ref
|
|
@@ -113,10 +113,4 @@ Typeahead.propTypes = {
|
|
|
113
113
|
dropdownInstruction: PropTypes.string
|
|
114
114
|
};
|
|
115
115
|
|
|
116
|
-
Typeahead.defaultProps = {
|
|
117
|
-
dropdownInstruction: null,
|
|
118
|
-
optionParser: null,
|
|
119
|
-
fetchErrorHandler: () => 'Sorry, there was an unexpected error. Please try again'
|
|
120
|
-
};
|
|
121
|
-
|
|
122
116
|
export default Typeahead;
|
|
@@ -10,7 +10,13 @@ const Video = styled.video.attrs(() => ({
|
|
|
10
10
|
`;
|
|
11
11
|
|
|
12
12
|
const VideoBanner = ({
|
|
13
|
-
video,
|
|
13
|
+
video,
|
|
14
|
+
poster,
|
|
15
|
+
controls = false,
|
|
16
|
+
autoPlay = true,
|
|
17
|
+
loop = false,
|
|
18
|
+
muted = true,
|
|
19
|
+
showPosterAfterPlaying = true
|
|
14
20
|
}) => {
|
|
15
21
|
// Use the prop as our default
|
|
16
22
|
const [isMuted, setIsMuted] = useState(muted);
|
|
@@ -53,14 +59,6 @@ const VideoBanner = ({
|
|
|
53
59
|
);
|
|
54
60
|
};
|
|
55
61
|
|
|
56
|
-
VideoBanner.defaultProps = {
|
|
57
|
-
showPosterAfterPlaying: true,
|
|
58
|
-
controls: false,
|
|
59
|
-
autoPlay: true,
|
|
60
|
-
loop: false,
|
|
61
|
-
muted: true
|
|
62
|
-
};
|
|
63
|
-
|
|
64
62
|
VideoBanner.propTypes = {
|
|
65
63
|
showPosterAfterPlaying: PropTypes.bool,
|
|
66
64
|
video: PropTypes.string.isRequired,
|
|
@@ -17,41 +17,41 @@ import {
|
|
|
17
17
|
} from './Donate.style';
|
|
18
18
|
|
|
19
19
|
const Donate = ({
|
|
20
|
-
alt,
|
|
20
|
+
alt = '',
|
|
21
|
+
data = {},
|
|
22
|
+
formAlignRight = true,
|
|
23
|
+
imageLow = null,
|
|
24
|
+
image = null,
|
|
25
|
+
images = null,
|
|
26
|
+
mobileImageLow = null,
|
|
27
|
+
mobileImage = null,
|
|
28
|
+
mobileImages = null,
|
|
29
|
+
mobileAlt = '',
|
|
30
|
+
desktopOverlayColor = 'transparent',
|
|
31
|
+
mobileBackgroundColor = 'blue_dark',
|
|
32
|
+
submitButtonColor = 'red',
|
|
33
|
+
textColor = 'white',
|
|
34
|
+
mbshipID = null,
|
|
35
|
+
otherAmountText =
|
|
36
|
+
'will help us fund amazing projects in the UK and around the world.',
|
|
37
|
+
subtitle = '',
|
|
38
|
+
noMoneyBuys = false,
|
|
39
|
+
PopUpText = 'Help us deliver long-term impact by converting your single donation into a monthly gift.',
|
|
40
|
+
chooseAmountText = '',
|
|
41
|
+
isDesktopOverride = null,
|
|
42
|
+
otherAmountValue = null,
|
|
43
|
+
title = null,
|
|
44
|
+
additionalSingleCopy = null,
|
|
45
|
+
additionalMonthlyCopy = null,
|
|
46
|
+
defaultGivingType = null,
|
|
47
|
+
monthlyTitle = '',
|
|
48
|
+
monthlySubtitle = '',
|
|
21
49
|
cartID,
|
|
22
50
|
clientID,
|
|
23
|
-
|
|
24
|
-
mobileBackgroundColor,
|
|
25
|
-
submitButtonColor,
|
|
26
|
-
textColor,
|
|
51
|
+
paddingOption = null,
|
|
27
52
|
donateLink,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
subtitle,
|
|
31
|
-
otherAmountText,
|
|
32
|
-
formAlignRight,
|
|
33
|
-
images,
|
|
34
|
-
image,
|
|
35
|
-
imageLow,
|
|
36
|
-
mobileImages,
|
|
37
|
-
mobileImage,
|
|
38
|
-
mobileImageLow,
|
|
39
|
-
mobileAlt,
|
|
40
|
-
mbshipID,
|
|
41
|
-
noMoneyBuys,
|
|
42
|
-
PopUpText,
|
|
43
|
-
chooseAmountText,
|
|
44
|
-
isDesktopOverride,
|
|
45
|
-
otherAmountValue,
|
|
46
|
-
additionalSingleCopy,
|
|
47
|
-
additionalMonthlyCopy,
|
|
48
|
-
defaultGivingType,
|
|
49
|
-
monthlyTitle,
|
|
50
|
-
monthlySubtitle,
|
|
51
|
-
paddingOption,
|
|
52
|
-
// Just to keep the function call character length under control
|
|
53
|
-
monthlyChooseAmountText: monthlyChoose,
|
|
54
|
-
monthlyOtherAmountText: monthlyOther
|
|
53
|
+
monthlyChooseAmountText: monthlyChoose = '',
|
|
54
|
+
monthlyOtherAmountText: monthlyOther = ''
|
|
55
55
|
}) => {
|
|
56
56
|
let isDesktop = useMediaQuery({ query: `(min-width: ${breakpointValues.L}px)` });
|
|
57
57
|
|
|
@@ -202,39 +202,4 @@ Donate.propTypes = {
|
|
|
202
202
|
paddingOption: PropTypes.string
|
|
203
203
|
};
|
|
204
204
|
|
|
205
|
-
Donate.defaultProps = {
|
|
206
|
-
alt: '',
|
|
207
|
-
data: {},
|
|
208
|
-
formAlignRight: true,
|
|
209
|
-
imageLow: null,
|
|
210
|
-
image: null,
|
|
211
|
-
images: null,
|
|
212
|
-
mobileImageLow: null,
|
|
213
|
-
mobileImage: null,
|
|
214
|
-
mobileImages: null,
|
|
215
|
-
mobileAlt: '',
|
|
216
|
-
desktopOverlayColor: 'transparent',
|
|
217
|
-
mobileBackgroundColor: 'blue_dark',
|
|
218
|
-
submitButtonColor: 'red',
|
|
219
|
-
textColor: 'white',
|
|
220
|
-
mbshipID: null,
|
|
221
|
-
otherAmountText:
|
|
222
|
-
'will help us fund amazing projects in the UK and around the world.',
|
|
223
|
-
subtitle: '',
|
|
224
|
-
noMoneyBuys: false,
|
|
225
|
-
PopUpText: 'Help us deliver long-term impact by converting your single donation into a monthly gift.',
|
|
226
|
-
chooseAmountText: '',
|
|
227
|
-
isDesktopOverride: null,
|
|
228
|
-
otherAmountValue: null,
|
|
229
|
-
title: null,
|
|
230
|
-
additionalSingleCopy: null,
|
|
231
|
-
additionalMonthlyCopy: null,
|
|
232
|
-
defaultGivingType: null,
|
|
233
|
-
monthlyTitle: '',
|
|
234
|
-
monthlySubtitle: '',
|
|
235
|
-
monthlyChooseAmountText: '',
|
|
236
|
-
monthlyOtherAmountText: '',
|
|
237
|
-
paddingOption: null
|
|
238
|
-
};
|
|
239
|
-
|
|
240
205
|
export default Donate;
|
|
@@ -11,7 +11,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
11
11
|
alt="Background image"
|
|
12
12
|
mobileBackgroundColor="deep_violet_dark"
|
|
13
13
|
desktopOverlayColor="red"
|
|
14
|
-
submitButtonColor="
|
|
14
|
+
submitButtonColor="blue_donate"
|
|
15
15
|
formAlignRight={true}
|
|
16
16
|
imageLow={desktopPictures.imageLow}
|
|
17
17
|
images={desktopPictures.images}
|
|
@@ -36,7 +36,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
36
36
|
|
|
37
37
|
<Donate
|
|
38
38
|
mobileBackgroundColor="blue_dark"
|
|
39
|
-
submitButtonColor="
|
|
39
|
+
submitButtonColor="blue_donate"
|
|
40
40
|
desktopOverlayColor="blue_dark"
|
|
41
41
|
formAlignRight={false}
|
|
42
42
|
imageLow={desktopPictures.imageLow}
|
|
@@ -64,7 +64,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
64
64
|
|
|
65
65
|
<Donate
|
|
66
66
|
mobileBackgroundColor="blue_dark"
|
|
67
|
-
submitButtonColor="
|
|
67
|
+
submitButtonColor="blue_donate"
|
|
68
68
|
desktopOverlayColor="blue_dark"
|
|
69
69
|
formAlignRight={false}
|
|
70
70
|
imageLow={desktopPictures.imageLow}
|
|
@@ -91,7 +91,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
91
91
|
|
|
92
92
|
<Donate
|
|
93
93
|
mobileBackgroundColor="blue_dark"
|
|
94
|
-
submitButtonColor="
|
|
94
|
+
submitButtonColor="blue_donate"
|
|
95
95
|
desktopOverlayColor="blue_dark"
|
|
96
96
|
formAlignRight={false}
|
|
97
97
|
imageLow={desktopPictures.imageLow}
|
|
@@ -217,7 +217,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
217
217
|
<Donate
|
|
218
218
|
alt="Background image"
|
|
219
219
|
mobileBackgroundColor="transparent"
|
|
220
|
-
submitButtonColor="
|
|
220
|
+
submitButtonColor="blue_donate"
|
|
221
221
|
desktopOverlayColor="transparent"
|
|
222
222
|
formAlignRight={true}
|
|
223
223
|
imageLow={desktopPictures.imageLow}
|
|
@@ -247,7 +247,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
247
247
|
|
|
248
248
|
<Donate
|
|
249
249
|
mobileBackgroundColor="transparent"
|
|
250
|
-
submitButtonColor="
|
|
250
|
+
submitButtonColor="blue_donate"
|
|
251
251
|
formAlignRight={false}
|
|
252
252
|
imageLow={desktopPictures.imageLow}
|
|
253
253
|
images={desktopPictures.images}
|
|
@@ -272,7 +272,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
272
272
|
|
|
273
273
|
<Donate
|
|
274
274
|
mobileBackgroundColor="blue_dark"
|
|
275
|
-
submitButtonColor="
|
|
275
|
+
submitButtonColor="blue_donate"
|
|
276
276
|
formAlignRight={false}
|
|
277
277
|
imageLow={desktopPictures.imageLow}
|
|
278
278
|
images={desktopPictures.images}
|
|
@@ -297,7 +297,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
297
297
|
|
|
298
298
|
<Donate
|
|
299
299
|
mobileBackgroundColor="blue_dark"
|
|
300
|
-
submitButtonColor="
|
|
300
|
+
submitButtonColor="blue_donate"
|
|
301
301
|
formAlignRight={false}
|
|
302
302
|
imageLow={desktopPictures.imageLow}
|
|
303
303
|
images={desktopPictures.images}
|
|
@@ -321,7 +321,7 @@ import data from './dev-data/data-single';
|
|
|
321
321
|
|
|
322
322
|
<Donate
|
|
323
323
|
desktopOverlayColor="blue_dark"
|
|
324
|
-
submitButtonColor="
|
|
324
|
+
submitButtonColor="blue_donate"
|
|
325
325
|
mobileBackgroundColor="blue_dark"
|
|
326
326
|
formAlignRight={false}
|
|
327
327
|
data={data}
|
|
@@ -346,7 +346,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
346
346
|
<Donate
|
|
347
347
|
alt="Background image"
|
|
348
348
|
mobileBackgroundColor="red"
|
|
349
|
-
submitButtonColor="
|
|
349
|
+
submitButtonColor="blue_donate"
|
|
350
350
|
desktopOverlayColor="red"
|
|
351
351
|
formAlignRight={true}
|
|
352
352
|
imageLow={desktopPictures.imageLow}
|
|
@@ -375,7 +375,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
375
375
|
alt="Background image"
|
|
376
376
|
mobileBackgroundColor="deep_violet_dark"
|
|
377
377
|
desktopOverlayColor="red"
|
|
378
|
-
submitButtonColor="
|
|
378
|
+
submitButtonColor="blue_donate"
|
|
379
379
|
formAlignRight={true}
|
|
380
380
|
imageLow={desktopPictures.imageLow}
|
|
381
381
|
images={desktopPictures.images}
|
|
@@ -404,7 +404,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
404
404
|
alt="Background image"
|
|
405
405
|
mobileBackgroundColor="deep_violet_dark"
|
|
406
406
|
desktopOverlayColor="red"
|
|
407
|
-
submitButtonColor="
|
|
407
|
+
submitButtonColor="blue_donate"
|
|
408
408
|
formAlignRight={true}
|
|
409
409
|
imageLow={desktopPictures.imageLow}
|
|
410
410
|
images={desktopPictures.images}
|
|
@@ -432,7 +432,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
432
432
|
alt="Background image"
|
|
433
433
|
mobileBackgroundColor="deep_violet_dark"
|
|
434
434
|
desktopOverlayColor="red"
|
|
435
|
-
submitButtonColor="
|
|
435
|
+
submitButtonColor="blue_donate"
|
|
436
436
|
formAlignRight={true}
|
|
437
437
|
imageLow={desktopPictures.imageLow}
|
|
438
438
|
images={desktopPictures.images}
|
|
@@ -460,7 +460,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
460
460
|
alt="Background image"
|
|
461
461
|
mobileBackgroundColor="deep_violet_dark"
|
|
462
462
|
desktopOverlayColor="red"
|
|
463
|
-
submitButtonColor="
|
|
463
|
+
submitButtonColor="blue_donate"
|
|
464
464
|
formAlignRight={true}
|
|
465
465
|
imageLow={desktopPictures.imageLow}
|
|
466
466
|
images={desktopPictures.images}
|
|
@@ -488,7 +488,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
488
488
|
alt="Background image"
|
|
489
489
|
mobileBackgroundColor="deep_violet_dark"
|
|
490
490
|
desktopOverlayColor="red"
|
|
491
|
-
submitButtonColor="
|
|
491
|
+
submitButtonColor="blue_donate"
|
|
492
492
|
formAlignRight={true}
|
|
493
493
|
imageLow={desktopPictures.imageLow}
|
|
494
494
|
images={desktopPictures.images}
|
|
@@ -515,7 +515,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
515
515
|
alt="Background image"
|
|
516
516
|
mobileBackgroundColor="deep_violet_dark"
|
|
517
517
|
desktopOverlayColor="red"
|
|
518
|
-
submitButtonColor="
|
|
518
|
+
submitButtonColor="blue_donate"
|
|
519
519
|
formAlignRight={true}
|
|
520
520
|
imageLow={desktopPictures.imageLow}
|
|
521
521
|
images={desktopPictures.images}
|
|
@@ -543,7 +543,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
543
543
|
alt="Background image"
|
|
544
544
|
mobileBackgroundColor="deep_violet_dark"
|
|
545
545
|
desktopOverlayColor="red"
|
|
546
|
-
submitButtonColor="
|
|
546
|
+
submitButtonColor="blue_donate"
|
|
547
547
|
formAlignRight={true}
|
|
548
548
|
imageLow={desktopPictures.imageLow}
|
|
549
549
|
images={desktopPictures.images}
|
|
@@ -574,7 +574,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
574
574
|
alt="Background image"
|
|
575
575
|
mobileBackgroundColor="deep_violet_dark"
|
|
576
576
|
desktopOverlayColor="red"
|
|
577
|
-
submitButtonColor="
|
|
577
|
+
submitButtonColor="blue_donate"
|
|
578
578
|
formAlignRight={true}
|
|
579
579
|
imageLow={desktopPictures.imageLow}
|
|
580
580
|
images={desktopPictures.images}
|
|
@@ -605,7 +605,7 @@ const desktopPictures = require('../../../styleguide/data/data').defaultData;
|
|
|
605
605
|
alt="Background image"
|
|
606
606
|
mobileBackgroundColor="deep_violet_dark"
|
|
607
607
|
desktopOverlayColor="red"
|
|
608
|
-
submitButtonColor="
|
|
608
|
+
submitButtonColor="blue_donate"
|
|
609
609
|
formAlignRight={true}
|
|
610
610
|
imageLow={desktopPictures.imageLow}
|
|
611
611
|
images={desktopPictures.images}
|
|
@@ -33,18 +33,16 @@ const Signup = ({
|
|
|
33
33
|
clientID,
|
|
34
34
|
cartID,
|
|
35
35
|
mbshipID,
|
|
36
|
-
noMoneyBuys,
|
|
36
|
+
noMoneyBuys = false,
|
|
37
37
|
PopUpText,
|
|
38
38
|
chooseAmountText,
|
|
39
39
|
submitButtonColor,
|
|
40
|
-
otherAmountValue,
|
|
41
|
-
additionalSingleCopy,
|
|
42
|
-
additionalMonthlyCopy,
|
|
43
|
-
defaultGivingType,
|
|
44
|
-
monthlyChooseAmountCopy,
|
|
45
|
-
monthlyOtherAmountCopy,
|
|
40
|
+
otherAmountValue = null,
|
|
41
|
+
additionalSingleCopy = null,
|
|
42
|
+
additionalMonthlyCopy = null,
|
|
43
|
+
defaultGivingType = null,
|
|
46
44
|
changeGivingType,
|
|
47
|
-
givingType,
|
|
45
|
+
givingType = null,
|
|
48
46
|
...rest
|
|
49
47
|
}) => {
|
|
50
48
|
// const [givingType, setGivingType] = useState();
|
|
@@ -345,22 +343,8 @@ Signup.propTypes = {
|
|
|
345
343
|
additionalSingleCopy: PropTypes.string,
|
|
346
344
|
additionalMonthlyCopy: PropTypes.string,
|
|
347
345
|
defaultGivingType: PropTypes.string,
|
|
348
|
-
monthlyChooseAmountCopy: PropTypes.string,
|
|
349
|
-
monthlyOtherAmountCopy: PropTypes.string,
|
|
350
346
|
changeGivingType: PropTypes.func.isRequired,
|
|
351
347
|
givingType: PropTypes.string
|
|
352
348
|
};
|
|
353
349
|
|
|
354
|
-
Signup.defaultProps = {
|
|
355
|
-
noMoneyBuys: false,
|
|
356
|
-
otherAmountValue: null,
|
|
357
|
-
data: {},
|
|
358
|
-
additionalSingleCopy: null,
|
|
359
|
-
additionalMonthlyCopy: null,
|
|
360
|
-
defaultGivingType: null,
|
|
361
|
-
monthlyChooseAmountCopy: null,
|
|
362
|
-
monthlyOtherAmountCopy: null,
|
|
363
|
-
givingType: null
|
|
364
|
-
};
|
|
365
|
-
|
|
366
350
|
export default Signup;
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from './GivingSelector.style';
|
|
7
7
|
|
|
8
8
|
const GivingSelector = ({
|
|
9
|
-
givingType, changeGivingType, setPopOpen, mbshipID
|
|
9
|
+
givingType = null, changeGivingType, setPopOpen, mbshipID
|
|
10
10
|
}) => {
|
|
11
11
|
// Only updates giving type and popup status when appropriate
|
|
12
12
|
const handleGivingTypeChange = (thisButtonType, currentGivingType) => {
|
|
@@ -51,10 +51,6 @@ const GivingSelector = ({
|
|
|
51
51
|
);
|
|
52
52
|
};
|
|
53
53
|
|
|
54
|
-
GivingSelector.defaultProps = {
|
|
55
|
-
givingType: null
|
|
56
|
-
};
|
|
57
|
-
|
|
58
54
|
GivingSelector.propTypes = {
|
|
59
55
|
givingType: PropTypes.string,
|
|
60
56
|
changeGivingType: PropTypes.func.isRequired,
|
|
@@ -12,7 +12,7 @@ const Switch = styled.span`
|
|
|
12
12
|
display: block;
|
|
13
13
|
position: absolute;
|
|
14
14
|
transition: left 0.15s ease-out;
|
|
15
|
-
background-color: ${({ theme }) => theme.color('
|
|
15
|
+
background-color: ${({ theme }) => theme.color('blue_donate')};
|
|
16
16
|
left: 2px;
|
|
17
17
|
box-shadow: 0px 0px 16px rgba(0, 0, 0, 0.3);
|
|
18
18
|
`;
|
|
@@ -42,7 +42,7 @@ const MoneyBox = styled.div`
|
|
|
42
42
|
${hideVisually}
|
|
43
43
|
}
|
|
44
44
|
input:focus:not(:checked) + label {
|
|
45
|
-
box-shadow: inset 0 0 0 4px ${({ theme }) => theme.color('
|
|
45
|
+
box-shadow: inset 0 0 0 4px ${({ theme }) => theme.color('blue_donate')};
|
|
46
46
|
}
|
|
47
47
|
`;
|
|
48
48
|
|
|
@@ -68,7 +68,7 @@ const Label = styled.label`
|
|
|
68
68
|
&:focus {
|
|
69
69
|
border: none;
|
|
70
70
|
outline: none;
|
|
71
|
-
box-shadow: inset 0 0 0 4px ${({ theme }) => theme.color('
|
|
71
|
+
box-shadow: inset 0 0 0 4px ${({ theme }) => theme.color('blue_donate')};
|
|
72
72
|
}
|
|
73
73
|
`;
|
|
74
74
|
|