@comicrelief/component-library 8.22.0 → 8.23.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.
@@ -32,6 +32,7 @@ const EmailSignUp = _ref => {
32
32
  privacyCopy,
33
33
  backgroundColour = 'deep_violet_dark',
34
34
  buttonColour = 'red',
35
+ buttonText = 'Subscribe',
35
36
  formContext,
36
37
  columnLayout = false,
37
38
  ...rest
@@ -86,6 +87,6 @@ const EmailSignUp = _ref => {
86
87
  loading: isSubmitting,
87
88
  loadingText: "Submitting...",
88
89
  "data-test": "subscribe-button"
89
- }, /*#__PURE__*/_react.default.createElement(_Text.default, null, "Subscribe")))), isSubmitted && !isSubmitSuccessful && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, errors.formError !== undefined && /*#__PURE__*/_react.default.createElement(_ErrorText.default, null, errors.formError.message)), /*#__PURE__*/_react.default.createElement(_EmailSignUp.PrivacyCopyWrapper, null, /*#__PURE__*/_react.default.createElement(_Text.default, null, privacyCopy)));
90
+ }, /*#__PURE__*/_react.default.createElement(_Text.default, null, buttonText)))), isSubmitted && !isSubmitSuccessful && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, errors.formError !== undefined && /*#__PURE__*/_react.default.createElement(_ErrorText.default, null, errors.formError.message)), /*#__PURE__*/_react.default.createElement(_EmailSignUp.PrivacyCopyWrapper, null, /*#__PURE__*/_react.default.createElement(_Text.default, null, privacyCopy)));
90
91
  };
91
92
  exports.EmailSignUp = EmailSignUp;
@@ -20,8 +20,7 @@ const FundraisingRegulatorLogo = () => /*#__PURE__*/_react.default.createElement
20
20
  width: '150px',
21
21
  textDecoration: 'none'
22
22
  },
23
- target: "_blank",
24
- rel: "noreferrer"
23
+ target: "_blank"
25
24
  }, /*#__PURE__*/_react.default.createElement("img", {
26
25
  src: "https://www.fundraisingregulator.org.uk/fr-badge/80983ed7-ea80-40db-8e52-4a3351d9e77d/en/white",
27
26
  width: "100%",
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.22.0",
4
+ "version": "8.23.0",
5
5
  "main": "dist/index.js",
6
6
  "license": "ISC",
7
7
  "jest": {
@@ -24,6 +24,7 @@ const EmailSignUp = ({
24
24
  privacyCopy,
25
25
  backgroundColour = 'deep_violet_dark',
26
26
  buttonColour = 'red',
27
+ buttonText = 'Subscribe',
27
28
  formContext,
28
29
  columnLayout = false,
29
30
  ...rest
@@ -93,7 +94,7 @@ const EmailSignUp = ({
93
94
  loadingText="Submitting..."
94
95
  data-test="subscribe-button"
95
96
  >
96
- <Text>Subscribe</Text>
97
+ <Text>{buttonText}</Text>
97
98
  </ButtonWithStates>
98
99
  </ButtonWrapper>
99
100
  </FormInner>
@@ -122,6 +123,7 @@ EmailSignUp.propTypes = {
122
123
  privacyCopy: PropTypes.node.isRequired,
123
124
  backgroundColour: PropTypes.string,
124
125
  buttonColour: PropTypes.string,
126
+ buttonText: PropTypes.string,
125
127
  formContext: PropTypes.shape().isRequired,
126
128
  columnLayout: PropTypes.bool
127
129
  };
@@ -16,7 +16,8 @@ const FundraisingRegulatorWrapper = styled.div`
16
16
  const FundraisingRegulatorLogo = () => (
17
17
  <FundraisingRegulatorWrapper>
18
18
  {/* Code from https://www.fundraisingregulator.org.uk/ */}
19
- <a href="https://www.fundraisingregulator.org.uk/validate?registrant=COMIC+RELIEF" className="fr-digital-badge" style={{ height: 'auto', width: '150px', textDecoration: 'none' }} target="_blank" rel="noreferrer">
19
+ {/* eslint-disable-next-line react/jsx-no-target-blank */}
20
+ <a href="https://www.fundraisingregulator.org.uk/validate?registrant=COMIC+RELIEF" className="fr-digital-badge" style={{ height: 'auto', width: '150px', textDecoration: 'none' }} target="_blank">
20
21
  <img src="https://www.fundraisingregulator.org.uk/fr-badge/80983ed7-ea80-40db-8e52-4a3351d9e77d/en/white" width="100%" alt="Fundraising Regulator badge with validation link" loading="lazy" />
21
22
  </a>
22
23
  </FundraisingRegulatorWrapper>