@comicrelief/component-library 7.15.0 → 7.16.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.
@@ -126,7 +126,8 @@ var CardDs = function CardDs(_ref14) {
126
126
  "aria-hidden": "true",
127
127
  tabIndex: "-1",
128
128
  href: link,
129
- target: target
129
+ target: target,
130
+ "data-cta-copy": linkLabel
130
131
  }, rest), Media);
131
132
  }
132
133
 
@@ -189,6 +189,7 @@ exports[`renders correctly 1`] = `
189
189
  <a
190
190
  aria-hidden="true"
191
191
  className="c1"
192
+ data-cta-copy="Find out more"
192
193
  href="/home"
193
194
  tabIndex="-1"
194
195
  target="_blank"
@@ -53,8 +53,7 @@ var SingleMessageDs = function SingleMessageDs(_ref) {
53
53
  var _useState = (0, _react.useState)(false),
54
54
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
55
55
  isOpen = _useState2[0],
56
- setIsOpen = _useState2[1]; // const openModal = () => setIsOpen(true);
57
-
56
+ setIsOpen = _useState2[1];
58
57
 
59
58
  var closeModal = function closeModal() {
60
59
  return setIsOpen(false);
@@ -77,7 +76,8 @@ var SingleMessageDs = function SingleMessageDs(_ref) {
77
76
  "aria-hidden": "true",
78
77
  tabIndex: "-1",
79
78
  href: link,
80
- target: target
79
+ target: target,
80
+ "data-cta-copy": linkLabel
81
81
  }, rest), Media);
82
82
  }
83
83
 
@@ -87,7 +87,8 @@ var SingleMessageDs = function SingleMessageDs(_ref) {
87
87
  "aria-hidden": "true",
88
88
  tabIndex: "-1",
89
89
  href: youTubeId,
90
- target: target
90
+ target: target,
91
+ "data-cta-copy": linkLabel
91
92
  }, rest, {
92
93
  onClick: function onClick(e) {
93
94
  setIsOpen(true);
@@ -234,6 +234,7 @@ exports[`renders correctly 1`] = `
234
234
  <a
235
235
  aria-hidden="true"
236
236
  className="c1"
237
+ data-cta-copy="Check out the shop"
237
238
  href="/home"
238
239
  tabIndex="-1"
239
240
  target="_blank"
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": "7.15.0",
4
+ "version": "7.16.0",
5
5
  "main": "dist/index.js",
6
6
  "license": "ISC",
7
7
  "jest": {
@@ -24,10 +24,11 @@
24
24
  "@babel/cli": "^7.14.8",
25
25
  "@hookform/resolvers": "^1.3.4",
26
26
  "axios": "^0.21.1",
27
+ "ejs": "^3.1.9",
27
28
  "jest-styled-components": "^7.0.5",
28
29
  "lazysizes": "^5.3.2",
29
30
  "lodash": "^4.17.11",
30
- "moment": "^2.29.1",
31
+ "moment": "^2.29.4",
31
32
  "prop-types": "^15.7.2",
32
33
  "react": "^17.0.2",
33
34
  "react-canvas-confetti": "^1.3.0",
@@ -35,12 +36,12 @@
35
36
  "react-dom": "^17.0.2",
36
37
  "react-hook-form": "^6.3.0",
37
38
  "react-modal": "^3.14.3",
38
- "react-responsive": "^9.0.0",
39
+ "react-responsive": "^9.0.2",
39
40
  "react-scripts": "4.0.3",
40
41
  "react-spinners": "^0.11.0",
41
42
  "react-styleguidist": "^11.1.7",
42
43
  "react-test-renderer": "^17.0.2",
43
- "react-uid": "^2.2.0",
44
+ "react-uid": "^2.3.2",
44
45
  "styled-components": "^5.3.1",
45
46
  "youtube-player": "^5.5.2",
46
47
  "yup": "^0.32.9"
@@ -73,7 +74,6 @@
73
74
  ]
74
75
  },
75
76
  "devDependencies": {
76
- "babel-eslint": "^10.0.2",
77
77
  "cross-env": "^7.0.3",
78
78
  "cypress": "^8.3.0",
79
79
  "eslint": "^7.32.0",
@@ -82,7 +82,6 @@
82
82
  "eslint-plugin-jsx-a11y": "^6.3.1",
83
83
  "eslint-plugin-react": "^7.24.0",
84
84
  "eslint-plugin-react-hooks": "^4.0.5",
85
- "husky": "^7.0.2",
86
85
  "jest": "^26.1.0",
87
86
  "npm-run-all": "^4.1.5",
88
87
  "prettier": "^2.3.2",
@@ -119,6 +119,7 @@ const CardDs = ({
119
119
  tabIndex="-1"
120
120
  href={link}
121
121
  target={target}
122
+ data-cta-copy={linkLabel}
122
123
  {...rest}
123
124
  >
124
125
  {Media}
@@ -189,6 +189,7 @@ exports[`renders correctly 1`] = `
189
189
  <a
190
190
  aria-hidden="true"
191
191
  className="c1"
192
+ data-cta-copy="Find out more"
192
193
  href="/home"
193
194
  tabIndex="-1"
194
195
  target="_blank"
@@ -31,7 +31,6 @@ const SingleMessageDs = ({
31
31
  }) => {
32
32
  const [isOpen, setIsOpen] = useState(false);
33
33
 
34
- // const openModal = () => setIsOpen(true);
35
34
  const closeModal = () => setIsOpen(false);
36
35
 
37
36
  const Media = (
@@ -57,6 +56,7 @@ const SingleMessageDs = ({
57
56
  tabIndex="-1"
58
57
  href={link}
59
58
  target={target}
59
+ data-cta-copy={linkLabel}
60
60
  {...rest}
61
61
  >
62
62
  {Media}
@@ -71,6 +71,7 @@ const SingleMessageDs = ({
71
71
  tabIndex="-1"
72
72
  href={youTubeId}
73
73
  target={target}
74
+ data-cta-copy={linkLabel}
74
75
  {...rest}
75
76
  onClick={e => { setIsOpen(true); e.preventDefault(); }}
76
77
  >
@@ -234,6 +234,7 @@ exports[`renders correctly 1`] = `
234
234
  <a
235
235
  aria-hidden="true"
236
236
  className="c1"
237
+ data-cta-copy="Check out the shop"
237
238
  href="/home"
238
239
  tabIndex="-1"
239
240
  target="_blank"