@comicrelief/component-library 8.1.2 → 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.
Files changed (120) hide show
  1. package/.eslintrc +1 -0
  2. package/dist/components/Atoms/Button/Button.js +3 -7
  3. package/dist/components/Atoms/ButtonWithStates/ButtonWithStates.js +3 -8
  4. package/dist/components/Atoms/Checkbox/Checkbox.js +2 -6
  5. package/dist/components/Atoms/Confetti/Confetti.js +2 -5
  6. package/dist/components/Atoms/Icons/Arrow.js +4 -10
  7. package/dist/components/Atoms/Icons/AtSign.js +3 -8
  8. package/dist/components/Atoms/Icons/Chevron.js +4 -10
  9. package/dist/components/Atoms/Icons/Download.js +3 -8
  10. package/dist/components/Atoms/Icons/External.js +3 -8
  11. package/dist/components/Atoms/Icons/Favourite.js +3 -8
  12. package/dist/components/Atoms/Icons/Internal.js +3 -8
  13. package/dist/components/Atoms/Input/Input.js +9 -17
  14. package/dist/components/Atoms/Label/Label.js +3 -12
  15. package/dist/components/Atoms/Link/Link.js +9 -18
  16. package/dist/components/Atoms/Logo/Logo.js +4 -11
  17. package/dist/components/Atoms/Pagination/Pagination.js +39 -52
  18. package/dist/components/Atoms/Picture/Picture.js +10 -22
  19. package/dist/components/Atoms/RichText/RichText.js +2 -6
  20. package/dist/components/Atoms/Select/Select.js +6 -16
  21. package/dist/components/Atoms/SocialIcons/SocialIcons.js +2 -3
  22. package/dist/components/Atoms/Text/Text.js +12 -17
  23. package/dist/components/Atoms/TextArea/TextArea.js +6 -11
  24. package/dist/components/Atoms/TextInputWithDropdown/TextInputWithDropdown.js +2 -9
  25. package/dist/components/Molecules/ArticleTeaser/ArticleTeaser.js +8 -18
  26. package/dist/components/Molecules/Banner/Banner.js +1 -4
  27. package/dist/components/Molecules/Box/Box.js +6 -17
  28. package/dist/components/Molecules/Card/Card.js +11 -24
  29. package/dist/components/Molecules/CardDs/CardDs.js +11 -24
  30. package/dist/components/Molecules/Chip/Chip.js +2 -6
  31. package/dist/components/Molecules/Countdown/Countdown.js +3 -8
  32. package/dist/components/Molecules/Logos/Logos.js +1 -4
  33. package/dist/components/Molecules/Lookup/Lookup.js +2 -6
  34. package/dist/components/Molecules/Promo/Promo.js +17 -36
  35. package/dist/components/Molecules/SchoolLookup/SchoolLookup.js +4 -10
  36. package/dist/components/Molecules/SearchInput/SearchInput.js +1 -4
  37. package/dist/components/Molecules/SearchResult/SearchResult.js +8 -17
  38. package/dist/components/Molecules/ShareButton/ShareButton.js +3 -8
  39. package/dist/components/Molecules/SimpleSchoolLookup/SimpleSchoolLookup.js +1 -4
  40. package/dist/components/Molecules/SingleMessage/SingleMessage.js +15 -32
  41. package/dist/components/Molecules/SingleMessageDS/SingleMessageDs.js +13 -28
  42. package/dist/components/Molecules/Typeahead/Typeahead.js +3 -8
  43. package/dist/components/Molecules/VideoBanner/VideoBanner.js +5 -12
  44. package/dist/components/Organisms/Donate/Donate.js +31 -65
  45. package/dist/components/Organisms/Donate/Form/Form.js +6 -19
  46. package/dist/components/Organisms/Donate/GivingSelector/GivingSelector.js +1 -4
  47. package/dist/components/Organisms/Donate/MoneyBuy/MoneyBuy.js +3 -8
  48. package/dist/components/Organisms/EmailSignUp/_EmailSignUp.js +4 -9
  49. package/dist/components/Organisms/EmailSignUp/_TextInput.js +3 -8
  50. package/dist/components/Organisms/Footer/Footer.js +6 -11
  51. package/dist/components/Organisms/Footer/Nav/Nav.js +1 -4
  52. package/dist/components/Organisms/Header/Header.js +2 -6
  53. package/dist/components/Organisms/Header/Nav/Nav.js +1 -4
  54. package/dist/components/Organisms/ImpactSlider/ImpactSlider.js +3 -8
  55. package/dist/components/Organisms/MarketingPreferencesDS/_CheckAnswer.js +2 -6
  56. package/dist/components/Organisms/MarketingPreferencesDS/_MarketingPreferencesDS.js +6 -16
  57. package/dist/components/Organisms/MarketingPreferencesDS/_TextInput.js +3 -8
  58. package/dist/components/Organisms/Membership/Form/Form.js +1 -5
  59. package/dist/components/Organisms/Membership/Membership.js +9 -19
  60. package/dist/components/Organisms/Membership/MoneyBox/MoneyBox.js +3 -8
  61. package/package.json +1 -1
  62. package/src/components/Atoms/Button/Button.js +3 -8
  63. package/src/components/Atoms/ButtonWithStates/ButtonWithStates.js +1 -7
  64. package/src/components/Atoms/Checkbox/Checkbox.js +1 -6
  65. package/src/components/Atoms/Confetti/Confetti.js +1 -5
  66. package/src/components/Atoms/Icons/Arrow.js +1 -8
  67. package/src/components/Atoms/Icons/AtSign.js +1 -7
  68. package/src/components/Atoms/Icons/Chevron.js +1 -8
  69. package/src/components/Atoms/Icons/Download.js +1 -7
  70. package/src/components/Atoms/Icons/External.js +1 -7
  71. package/src/components/Atoms/Icons/Favourite.js +1 -7
  72. package/src/components/Atoms/Icons/Internal.js +1 -7
  73. package/src/components/Atoms/Input/Input.js +9 -18
  74. package/src/components/Atoms/Label/Label.js +3 -13
  75. package/src/components/Atoms/Link/Link.js +9 -19
  76. package/src/components/Atoms/Logo/Logo.js +1 -8
  77. package/src/components/Atoms/Pagination/Pagination.js +38 -51
  78. package/src/components/Atoms/Picture/Picture.js +10 -23
  79. package/src/components/Atoms/RichText/RichText.js +1 -6
  80. package/src/components/Atoms/Select/Select.js +6 -17
  81. package/src/components/Atoms/SocialIcons/SocialIcons.js +2 -5
  82. package/src/components/Atoms/Text/Text.js +4 -13
  83. package/src/components/Atoms/TextArea/TextArea.js +2 -9
  84. package/src/components/Atoms/TextInputWithDropdown/TextInputWithDropdown.js +2 -11
  85. package/src/components/Molecules/ArticleTeaser/ArticleTeaser.js +8 -19
  86. package/src/components/Molecules/Banner/Banner.js +1 -5
  87. package/src/components/Molecules/Box/Box.js +6 -18
  88. package/src/components/Molecules/Card/Card.js +11 -25
  89. package/src/components/Molecules/CardDs/CardDs.js +11 -25
  90. package/src/components/Molecules/Chip/Chip.js +1 -6
  91. package/src/components/Molecules/Countdown/Countdown.js +1 -7
  92. package/src/components/Molecules/Logos/Logos.js +1 -5
  93. package/src/components/Molecules/Lookup/Lookup.js +2 -7
  94. package/src/components/Molecules/Promo/Promo.js +17 -37
  95. package/src/components/Molecules/SchoolLookup/SchoolLookup.js +4 -11
  96. package/src/components/Molecules/SearchInput/SearchInput.js +1 -5
  97. package/src/components/Molecules/SearchResult/SearchResult.js +8 -18
  98. package/src/components/Molecules/ShareButton/ShareButton.js +1 -7
  99. package/src/components/Molecules/SimpleSchoolLookup/SimpleSchoolLookup.js +4 -5
  100. package/src/components/Molecules/SingleMessage/SingleMessage.js +15 -33
  101. package/src/components/Molecules/SingleMessageDS/SingleMessageDs.js +13 -29
  102. package/src/components/Molecules/Typeahead/Typeahead.js +3 -9
  103. package/src/components/Molecules/VideoBanner/VideoBanner.js +7 -9
  104. package/src/components/Organisms/Donate/Donate.js +32 -67
  105. package/src/components/Organisms/Donate/Form/Form.js +6 -22
  106. package/src/components/Organisms/Donate/GivingSelector/GivingSelector.js +1 -5
  107. package/src/components/Organisms/Donate/MoneyBuy/MoneyBuy.js +3 -9
  108. package/src/components/Organisms/EmailSignUp/_EmailSignUp.js +3 -9
  109. package/src/components/Organisms/EmailSignUp/_TextInput.js +3 -9
  110. package/src/components/Organisms/Footer/Footer.js +2 -10
  111. package/src/components/Organisms/Footer/Nav/Nav.js +1 -5
  112. package/src/components/Organisms/Header/Header.js +1 -6
  113. package/src/components/Organisms/Header/Nav/Nav.js +1 -5
  114. package/src/components/Organisms/ImpactSlider/ImpactSlider.js +1 -7
  115. package/src/components/Organisms/MarketingPreferencesDS/_CheckAnswer.js +1 -6
  116. package/src/components/Organisms/MarketingPreferencesDS/_MarketingPreferencesDS.js +5 -17
  117. package/src/components/Organisms/MarketingPreferencesDS/_TextInput.js +1 -7
  118. package/src/components/Organisms/Membership/Form/Form.js +1 -5
  119. package/src/components/Organisms/Membership/Membership.js +9 -19
  120. package/src/components/Organisms/Membership/MoneyBox/MoneyBox.js +3 -9
@@ -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
- desktopOverlayColor,
24
- mobileBackgroundColor,
25
- submitButtonColor,
26
- textColor,
51
+ paddingOption = null,
27
52
  donateLink,
28
- data,
29
- title,
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;
@@ -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,
@@ -45,9 +45,9 @@ const MoneyBuyButton = styled(Input)`
45
45
 
46
46
  const MoneyBuy = ({
47
47
  setOtherAmount,
48
- amount,
49
- currency,
50
- description,
48
+ amount = '10',
49
+ currency = '£',
50
+ description = 'description',
51
51
  ...rest
52
52
  }) => (
53
53
  <MoneyBuyButton
@@ -69,10 +69,4 @@ MoneyBuy.propTypes = {
69
69
  setOtherAmount: PropTypes.func.isRequired
70
70
  };
71
71
 
72
- MoneyBuy.defaultProps = {
73
- amount: '10',
74
- currency: '£',
75
- description: 'description'
76
- };
77
-
78
72
  export default MoneyBuy;
@@ -22,10 +22,10 @@ const EmailSignUp = ({
22
22
  topCopy,
23
23
  successCopy,
24
24
  privacyCopy,
25
- backgroundColour,
26
- buttonColour,
25
+ backgroundColour = 'deep_violet_dark',
26
+ buttonColour = 'red',
27
27
  formContext,
28
- columnLayout,
28
+ columnLayout = false,
29
29
  ...rest
30
30
  }) => {
31
31
  const {
@@ -126,10 +126,4 @@ EmailSignUp.propTypes = {
126
126
  columnLayout: PropTypes.bool
127
127
  };
128
128
 
129
- EmailSignUp.defaultProps = {
130
- backgroundColour: 'deep_violet_dark',
131
- buttonColour: 'red',
132
- columnLayout: false
133
- };
134
-
135
129
  export { EmailSignUp, buildEsuValidationSchema, ESU_FIELDS };
@@ -7,9 +7,9 @@ import Input from '../../Atoms/Input/Input';
7
7
  const TextInput = ({
8
8
  fieldName,
9
9
  label,
10
- optional,
11
- fieldType,
12
- formContext,
10
+ optional = null,
11
+ fieldType = 'text',
12
+ formContext = null,
13
13
  ...rest
14
14
  }) => {
15
15
  const { formState: { errors }, register } = formContext;
@@ -28,12 +28,6 @@ const TextInput = ({
28
28
  return <Input {...props} {...register(fieldName)} />;
29
29
  };
30
30
 
31
- TextInput.defaultProps = {
32
- optional: null,
33
- fieldType: 'text',
34
- formContext: null
35
- };
36
-
37
31
  TextInput.propTypes = {
38
32
  fieldName: PropTypes.string.isRequired,
39
33
  label: PropTypes.string.isRequired,
@@ -16,14 +16,14 @@ import {
16
16
  } from './Footer.style';
17
17
 
18
18
  const Footer = ({
19
- navItems, footerCopy, campaign, additionalLegalLine, ...rest
19
+ navItems = {}, footerCopy = '', campaign = 'Comic Relief', additionalLegalLine = '', overrideallowList = false, ...rest
20
20
  }) => {
21
21
  // Remove white space between words
22
22
  const campaignName = campaign.replace(/\s/g, '').toLowerCase();
23
23
 
24
24
  return (
25
25
  <div>
26
- <FooterWrapper navItems {...rest}>
26
+ <FooterWrapper overrideallowList={overrideallowList} navItems {...rest}>
27
27
  <InnerWrapper>
28
28
  {additionalLegalLine
29
29
  && <FooterLegalLine tag="p" color="grey">{additionalLegalLine}</FooterLegalLine>
@@ -56,12 +56,4 @@ Footer.propTypes = {
56
56
  additionalLegalLine: PropTypes.string
57
57
  };
58
58
 
59
- Footer.defaultProps = {
60
- navItems: {},
61
- footerCopy: '',
62
- campaign: 'Comic Relief',
63
- overrideallowList: false,
64
- additionalLegalLine: ''
65
- };
66
-
67
59
  export default Footer;
@@ -16,7 +16,7 @@ import {
16
16
  SubNavLink
17
17
  } from './Nav.style';
18
18
 
19
- const FooterNav = ({ navItems, ...rest }) => {
19
+ const FooterNav = ({ navItems = {}, ...rest }) => {
20
20
  const { menuGroups } = navItems;
21
21
  const [isExpandable] = useState(false);
22
22
  const [isSubMenuOpen, setIsSubMenuOpen] = useState({});
@@ -123,8 +123,4 @@ FooterNav.propTypes = {
123
123
  navItems: PropTypes.objectOf(PropTypes.shape)
124
124
  };
125
125
 
126
- FooterNav.defaultProps = {
127
- navItems: {}
128
- };
129
-
130
126
  export default FooterNav;
@@ -8,7 +8,7 @@ import {
8
8
  } from './Header.style';
9
9
 
10
10
  const Header = ({
11
- navItems, metaIcons, campaign, ...rest
11
+ navItems = {}, metaIcons, campaign = 'Comic Relief', ...rest
12
12
  }) => (
13
13
  <HeaderWrapper navItems {...rest}>
14
14
  <InnerWrapper>
@@ -29,9 +29,4 @@ Header.propTypes = {
29
29
  campaign: PropTypes.string
30
30
  };
31
31
 
32
- Header.defaultProps = {
33
- navItems: {},
34
- campaign: 'Comic Relief'
35
- };
36
-
37
32
  export default Header;
@@ -21,7 +21,7 @@ import {
21
21
  ChevronWrapper
22
22
  } from './Nav.style';
23
23
 
24
- const MainNav = ({ navItems }) => {
24
+ const MainNav = ({ navItems = {} }) => {
25
25
  const { menuGroups } = navItems;
26
26
  const [isExpandable, setIsExpandable] = useState(false);
27
27
  const [isSubMenuOpen, setIsSubMenuOpen] = useState({});
@@ -180,8 +180,4 @@ MainNav.propTypes = {
180
180
  navItems: PropTypes.objectOf(PropTypes.shape)
181
181
  };
182
182
 
183
- MainNav.defaultProps = {
184
- navItems: {}
185
- };
186
-
187
183
  export default MainNav;
@@ -11,7 +11,7 @@ import {
11
11
 
12
12
  const ImpactSlider = ({
13
13
  heading, cartID, donateLink, rowID, items, step, max,
14
- backgroundColour, opacityAnimation, children, defaultSliderValue
14
+ backgroundColour = 'grey_extra_light', opacityAnimation = false, children, defaultSliderValue = null
15
15
  }) => {
16
16
  // Use the lowest possible amount as our default:
17
17
  const [currentAmount, setCurrentAmount] = useState(defaultSliderValue || step);
@@ -65,12 +65,6 @@ const ImpactSlider = ({
65
65
  );
66
66
  };
67
67
 
68
- ImpactSlider.defaultProps = {
69
- opacityAnimation: false,
70
- defaultSliderValue: null,
71
- backgroundColour: 'grey_extra_light'
72
- };
73
-
74
68
  ImpactSlider.propTypes = {
75
69
  heading: PropTypes.string.isRequired,
76
70
  children: PropTypes.node.isRequired,
@@ -9,7 +9,7 @@ import {
9
9
  } from './MarketingPreferencesDS.style';
10
10
 
11
11
  const CheckAnswer = ({
12
- name, mpValidationOptions, userSelection, formContext
12
+ name, mpValidationOptions, userSelection = null, formContext = null
13
13
  }) => {
14
14
  const { setValue, clearErrors, register } = formContext;
15
15
 
@@ -63,11 +63,6 @@ const CheckAnswer = ({
63
63
  );
64
64
  };
65
65
 
66
- CheckAnswer.defaultProps = {
67
- userSelection: null,
68
- formContext: null
69
- };
70
-
71
66
  CheckAnswer.propTypes = {
72
67
  name: PropTypes.string.isRequired,
73
68
  /* These options are created in _MarketingPrefsConfig.js, passed to react-hook-form
@@ -15,11 +15,11 @@ import {
15
15
  } from './_MarketingPrefsConfig';
16
16
 
17
17
  const MarketingPreferencesDS = ({
18
- copyTop,
19
- copyBottom,
18
+ copyTop = defaultCopyTop,
19
+ copyBottom = defaultCopyBottom,
20
20
  mpValidationOptions,
21
- id,
22
- formContext
21
+ id = null,
22
+ formContext = null
23
23
  }) => {
24
24
  const { formState: { errors }, control } = formContext;
25
25
 
@@ -241,7 +241,7 @@ const MarketingPreferencesDS = ({
241
241
  };
242
242
 
243
243
  // removes from DOM completely
244
- const MaybeDisabled = ({ children, disabled }) => {
244
+ const MaybeDisabled = ({ children = null, disabled = false }) => {
245
245
  if (disabled) return null;
246
246
  return children;
247
247
  };
@@ -256,23 +256,11 @@ MarketingPreferencesDS.propTypes = {
256
256
  formContext: PropTypes.shape()
257
257
  };
258
258
 
259
- MarketingPreferencesDS.defaultProps = {
260
- copyTop: defaultCopyTop,
261
- copyBottom: defaultCopyBottom,
262
- id: null,
263
- formContext: null
264
- };
265
-
266
259
  MaybeDisabled.propTypes = {
267
260
  children: PropTypes.node,
268
261
  disabled: PropTypes.bool
269
262
  };
270
263
 
271
- MaybeDisabled.defaultProps = {
272
- children: null,
273
- disabled: false
274
- };
275
-
276
264
  export {
277
265
  MarketingPreferencesDS, setInitialValues, buildValidationSchema
278
266
  };
@@ -4,7 +4,7 @@ import Input from '../../Atoms/Input/Input';
4
4
 
5
5
  const TextInput = ({
6
6
  fieldName, label,
7
- optional, fieldType, formContext, ...rest
7
+ optional = null, fieldType = 'text', formContext = null, ...rest
8
8
  }) => {
9
9
  const { formState: { errors }, register } = formContext;
10
10
 
@@ -23,12 +23,6 @@ const TextInput = ({
23
23
  return <Input {...props} {...register(fieldName)} />;
24
24
  };
25
25
 
26
- TextInput.defaultProps = {
27
- optional: null,
28
- fieldType: 'text',
29
- formContext: null
30
- };
31
-
32
26
  TextInput.propTypes = {
33
27
  fieldName: PropTypes.string.isRequired,
34
28
  label: PropTypes.string.isRequired,
@@ -27,7 +27,7 @@ const Signup = ({
27
27
  data: { regularGiving },
28
28
  donateLink,
29
29
  otherDescription,
30
- clientID,
30
+ clientID = 'the_fix',
31
31
  cartID,
32
32
  mbshipID,
33
33
  ...rest
@@ -204,8 +204,4 @@ Signup.propTypes = {
204
204
  data: PropTypes.objectOf(PropTypes.shape)
205
205
  };
206
206
 
207
- Signup.defaultProps = {
208
- clientID: 'the_fix',
209
- data: {}
210
- };
211
207
  export default Signup;
@@ -8,19 +8,19 @@ import {
8
8
  } from './Membership.style';
9
9
 
10
10
  const Membership = ({
11
- alt,
11
+ alt = '',
12
+ data = {},
13
+ formAligntRight = true,
14
+ imageLow = null,
15
+ image = null,
16
+ images = null,
17
+ backgroundColor = null,
18
+ mbshipID = null,
12
19
  cartID,
13
- backgroundColor,
14
20
  donateLink,
15
- data,
16
21
  title,
17
22
  subtitle,
18
- otherDescription,
19
- formAligntRight,
20
- images,
21
- image,
22
- imageLow,
23
- mbshipID
23
+ otherDescription
24
24
  }) => (
25
25
  <Container
26
26
  formAligntRight={formAligntRight}
@@ -72,14 +72,4 @@ Membership.propTypes = {
72
72
  mbshipID: PropTypes.string
73
73
  };
74
74
 
75
- Membership.defaultProps = {
76
- alt: '',
77
- data: {},
78
- formAligntRight: true,
79
- imageLow: null,
80
- image: null,
81
- images: null,
82
- backgroundColor: null,
83
- mbshipID: null
84
- };
85
75
  export default Membership;
@@ -24,9 +24,9 @@ const MoneyBox = styled(Input)`
24
24
 
25
25
  const MoneyBuy = ({
26
26
  setOtherAmount,
27
- amount,
28
- currency,
29
- description,
27
+ amount = '10',
28
+ currency = '£',
29
+ description = 'description',
30
30
  ...rest
31
31
  }) => (
32
32
  <MoneyBox
@@ -48,10 +48,4 @@ MoneyBuy.propTypes = {
48
48
  setOtherAmount: PropTypes.func.isRequired
49
49
  };
50
50
 
51
- MoneyBuy.defaultProps = {
52
- amount: '10',
53
- currency: '£',
54
- description: 'description'
55
- };
56
-
57
51
  export default MoneyBuy;