@comicrelief/component-library 8.5.0 → 8.5.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.
@@ -31,7 +31,8 @@ const MarketingPreferencesDS = _ref => {
31
31
  copyBottom = _DefaultCopy.defaultCopyBottom,
32
32
  mpValidationOptions,
33
33
  id = null,
34
- formContext = null
34
+ formContext = null,
35
+ ...rest
35
36
  } = _ref;
36
37
  const {
37
38
  formState: {
@@ -89,9 +90,9 @@ const MarketingPreferencesDS = _ref => {
89
90
  const showPhoneField = !mp_permissionPhone.hideInput && (phoneChoice || errors.mp_phone);
90
91
  const showPostFields = !mp_permissionPost.hideInput && (postChoice || isAddressErroring());
91
92
  const customId = id ? "marketing-preferences--".concat(id) : 'marketing-preferences';
92
- return /*#__PURE__*/_react.default.createElement(_MarketingPreferencesDS.OuterWrapper, {
93
+ return /*#__PURE__*/_react.default.createElement(_MarketingPreferencesDS.OuterWrapper, Object.assign({
93
94
  id: customId
94
- }, copyTop && /*#__PURE__*/_react.default.createElement(_MarketingPreferencesDS.TopCopyWrapper, null, copyTop), !mp_permissionEmail.disableOption && /*#__PURE__*/_react.default.createElement(_MarketingPreferencesDS.FormField, {
95
+ }, rest), copyTop && /*#__PURE__*/_react.default.createElement(_MarketingPreferencesDS.TopCopyWrapper, null, copyTop), !mp_permissionEmail.disableOption && /*#__PURE__*/_react.default.createElement(_MarketingPreferencesDS.FormField, {
95
96
  className: "field-email"
96
97
  }, /*#__PURE__*/_react.default.createElement(_MarketingPreferencesDS.Head, null, /*#__PURE__*/_react.default.createElement(_CheckAnswer.default, {
97
98
  mpValidationOptions: mpValidationOptions,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@comicrelief/component-library",
3
3
  "author": "Comic Relief Engineering Team",
4
- "version": "8.5.0",
4
+ "version": "8.5.1",
5
5
  "main": "dist/index.js",
6
6
  "license": "ISC",
7
7
  "jest": {
@@ -19,7 +19,8 @@ const MarketingPreferencesDS = ({
19
19
  copyBottom = defaultCopyBottom,
20
20
  mpValidationOptions,
21
21
  id = null,
22
- formContext = null
22
+ formContext = null,
23
+ ...rest
23
24
  }) => {
24
25
  const { formState: { errors }, control } = formContext;
25
26
 
@@ -61,7 +62,7 @@ const MarketingPreferencesDS = ({
61
62
  const customId = id ? `marketing-preferences--${id}` : 'marketing-preferences';
62
63
 
63
64
  return (
64
- <OuterWrapper id={customId}>
65
+ <OuterWrapper id={customId} {...rest}>
65
66
  {copyTop && <TopCopyWrapper>{copyTop}</TopCopyWrapper>}
66
67
 
67
68
  {/* Render Email checkboxes and input if not removed in config */}