@comicrelief/component-library 7.35.10 → 7.37.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 (37) hide show
  1. package/dist/components/Atoms/Icons/Arrow.js +25 -4
  2. package/dist/components/Atoms/Icons/AtSign.js +32 -6
  3. package/dist/components/Atoms/Icons/Chevron.js +25 -3
  4. package/dist/components/Atoms/Icons/Download.js +31 -4
  5. package/dist/components/Atoms/Icons/External.js +31 -4
  6. package/dist/components/Atoms/Icons/Favourite.js +31 -4
  7. package/dist/components/Atoms/Icons/Internal.js +31 -4
  8. package/dist/components/Atoms/Link/Link.js +3 -0
  9. package/dist/components/Atoms/Link/Link.md +23 -21
  10. package/dist/components/Atoms/Link/Link.style.js +30 -13
  11. package/dist/components/Atoms/Link/Link.test.js +6 -6
  12. package/dist/components/Molecules/Accordion/__snapshots__/Accordion.test.js.snap +7 -0
  13. package/dist/components/Molecules/CardDs/__snapshots__/CardDs.test.js.snap +23 -0
  14. package/dist/components/Molecules/Promo/__snapshots__/Promo.test.js.snap +24 -0
  15. package/dist/components/Molecules/SingleMessage/__snapshots__/SingleMessage.test.js.snap +32 -0
  16. package/dist/components/Molecules/SingleMessageDS/__snapshots__/SingleMessageDs.test.js.snap +23 -0
  17. package/dist/components/Organisms/CookieBanner/CookieBanner.test.js +4 -4
  18. package/dist/theme/crTheme/buttonColors.js +1 -1
  19. package/package.json +1 -1
  20. package/src/components/Atoms/Icons/Arrow.js +13 -2
  21. package/src/components/Atoms/Icons/AtSign.js +20 -7
  22. package/src/components/Atoms/Icons/Chevron.js +13 -1
  23. package/src/components/Atoms/Icons/Download.js +18 -4
  24. package/src/components/Atoms/Icons/External.js +18 -4
  25. package/src/components/Atoms/Icons/Favourite.js +18 -4
  26. package/src/components/Atoms/Icons/Internal.js +18 -4
  27. package/src/components/Atoms/Link/Link.js +4 -0
  28. package/src/components/Atoms/Link/Link.md +23 -21
  29. package/src/components/Atoms/Link/Link.style.js +9 -0
  30. package/src/components/Atoms/Link/Link.test.js +32 -9
  31. package/src/components/Molecules/Accordion/__snapshots__/Accordion.test.js.snap +7 -0
  32. package/src/components/Molecules/CardDs/__snapshots__/CardDs.test.js.snap +23 -0
  33. package/src/components/Molecules/Promo/__snapshots__/Promo.test.js.snap +24 -0
  34. package/src/components/Molecules/SingleMessage/__snapshots__/SingleMessage.test.js.snap +32 -0
  35. package/src/components/Molecules/SingleMessageDS/__snapshots__/SingleMessageDs.test.js.snap +23 -0
  36. package/src/components/Organisms/CookieBanner/CookieBanner.test.js +21 -9
  37. package/src/theme/crTheme/buttonColors.js +1 -1
@@ -17,25 +17,45 @@ const angle = {
17
17
  const Icon = _styledComponents.default.svg.withConfig({
18
18
  displayName: "Arrow__Icon",
19
19
  componentId: "sc-1iegggu-0"
20
- })(["transform:", ";"], _ref => {
20
+ })(["transform:", ";fill:", ";@media ", "{fill:", ";}"], _ref => {
21
21
  let {
22
22
  direction
23
23
  } = _ref;
24
24
  return "rotate(".concat(angle[direction], ")");
25
+ }, _ref2 => {
26
+ let {
27
+ mobileColour,
28
+ colour,
29
+ theme
30
+ } = _ref2;
31
+ return mobileColour ? theme.color(mobileColour) : theme.color(colour);
32
+ }, _ref3 => {
33
+ let {
34
+ theme
35
+ } = _ref3;
36
+ return theme.breakpoint('medium');
37
+ }, _ref4 => {
38
+ let {
39
+ colour,
40
+ theme
41
+ } = _ref4;
42
+ return colour ? theme.color(colour) : theme.color('white');
25
43
  });
26
- const Arrow = _ref2 => {
44
+ const Arrow = _ref5 => {
27
45
  let {
28
46
  colour,
47
+ mobileColour,
29
48
  theme,
30
49
  size,
31
50
  direction,
32
51
  ...rest
33
- } = _ref2;
52
+ } = _ref5;
34
53
  return /*#__PURE__*/_react.default.createElement(Icon, Object.assign({
35
54
  direction: direction,
36
55
  width: size,
37
56
  height: size,
38
- fill: theme.color(colour),
57
+ colour: colour,
58
+ mobileColour: mobileColour,
39
59
  xmlns: "http://www.w3.org/2000/svg",
40
60
  viewBox: "0 0 96 96"
41
61
  }, rest), /*#__PURE__*/_react.default.createElement("path", {
@@ -46,6 +66,7 @@ const Arrow = _ref2 => {
46
66
  };
47
67
  Arrow.defaultProps = {
48
68
  colour: 'white',
69
+ mobileColour: null,
49
70
  size: 24,
50
71
  direction: 'up'
51
72
  };
@@ -1,24 +1,49 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.default = void 0;
8
9
  var _react = _interopRequireDefault(require("react"));
9
- var _styledComponents = require("styled-components");
10
+ var _styledComponents = _interopRequireWildcard(require("styled-components"));
10
11
  const PATH_DATA = 'M40.811,9.307C36.607,4.664,30.48,2,24,2C11.458,2,2,11.458,2,24s9.458,22,22,22c10.221,0,14.032-3.779,15.29-5.031 c0.197-0.115,0.379-0.265,0.533-0.451c0.707-0.849,0.592-2.11-0.257-2.817c-0.438-0.362-1.61-1.049-3.093,0.427 C35.512,39.086,32.585,42,24,42C13.738,42,6,34.262,6,24S13.738,6,24,6c5.353,0,10.398,2.184,13.845,5.991 c3.162,3.495,4.642,8.044,4.165,12.81c-0.364,3.641-1.958,6.013-4.487,6.677c-1.853,0.487-3.658-0.145-4.269-1.011 c-1.001-1.422-0.753-4.747,0.009-8.237c1.035-3.375,2.104-6.939,2.177-7.179c0.308-1.027-0.249-2.114-1.263-2.465 c-1.012-0.349-2.122,0.161-2.515,1.159c-0.097,0.247-0.191,0.491-0.282,0.732c-1.427-1.455-3.424-2.421-5.724-2.66 c-3.983-0.41-9.547,1.602-12.107,8.643c-1.334,3.667-1.19,7.467,0.384,10.163c1.241,2.126,3.291,3.482,5.929,3.921 c4.299,0.714,7.438-0.837,9.464-3.098c0.254,0.695,0.516,1.122,0.659,1.325c1.66,2.358,5.257,3.443,8.555,2.576 c1.987-0.522,6.691-2.557,7.451-10.147C46.581,19.295,44.741,13.651,40.811,9.307z M37.871,41.195 c-0.149-0.03-0.3-0.081-0.448-0.152C37.567,41.112,37.718,41.163,37.871,41.195z M29.195,21.849 c-0.554,1.799-1.07,3.451-1.379,4.375c-0.413,1.243-2.174,5.229-7.297,4.374c-1.468-0.245-2.493-0.896-3.133-1.993 c-0.967-1.657-0.997-4.254-0.078-6.779c1.633-4.492,4.727-6.064,7.296-6.064c0.217,0,0.431,0.011,0.639,0.033 c1.952,0.203,4.068,1.433,4.396,3.726c0.01,0.074,0.024,0.146,0.043,0.217C29.49,20.479,29.329,21.181,29.195,21.849z';
11
- const AtSign = _ref => {
12
+ const StyledSVG = _styledComponents.default.svg.withConfig({
13
+ displayName: "AtSign__StyledSVG",
14
+ componentId: "sc-1328gc9-0"
15
+ })(["fill:", ";@media ", "{fill:", ";}"], _ref => {
16
+ let {
17
+ mobileColour,
18
+ colour,
19
+ theme
20
+ } = _ref;
21
+ return mobileColour ? theme.color(mobileColour) : theme.color(colour);
22
+ }, _ref2 => {
23
+ let {
24
+ theme
25
+ } = _ref2;
26
+ return theme.breakpoint('medium');
27
+ }, _ref3 => {
28
+ let {
29
+ colour,
30
+ theme
31
+ } = _ref3;
32
+ return colour ? theme.color(colour) : theme.color('white');
33
+ });
34
+ const AtSign = _ref4 => {
12
35
  let {
13
36
  theme,
14
37
  size,
15
38
  colour,
39
+ mobileColour,
16
40
  ...rest
17
- } = _ref;
18
- return /*#__PURE__*/_react.default.createElement("svg", Object.assign({
41
+ } = _ref4;
42
+ return /*#__PURE__*/_react.default.createElement(StyledSVG, Object.assign({
19
43
  width: size,
20
44
  height: size,
21
- fill: theme.color(colour),
45
+ colour: colour,
46
+ mobileColour: mobileColour,
22
47
  viewBox: "0 0 48 48"
23
48
  }, rest), /*#__PURE__*/_react.default.createElement("path", {
24
49
  d: PATH_DATA
@@ -26,6 +51,7 @@ const AtSign = _ref => {
26
51
  };
27
52
  AtSign.defaultProps = {
28
53
  size: 24,
29
- colour: 'white'
54
+ colour: 'white',
55
+ mobileColour: null
30
56
  };
31
57
  var _default = exports.default = (0, _styledComponents.withTheme)(AtSign);
@@ -17,25 +17,46 @@ const angle = {
17
17
  const Icon = _styledComponents.default.svg.withConfig({
18
18
  displayName: "Chevron__Icon",
19
19
  componentId: "sc-1p4fsgl-0"
20
- })(["transform:", ";"], _ref => {
20
+ })(["transform:", ";fill:", ";@media ", "{fill:", ";}"], _ref => {
21
21
  let {
22
22
  direction
23
23
  } = _ref;
24
24
  return "rotate(".concat(angle[direction], ")");
25
+ }, _ref2 => {
26
+ let {
27
+ mobileColour,
28
+ colour,
29
+ theme
30
+ } = _ref2;
31
+ return mobileColour ? theme.color(mobileColour) : theme.color(colour);
32
+ }, _ref3 => {
33
+ let {
34
+ theme
35
+ } = _ref3;
36
+ return theme.breakpoint('medium');
37
+ }, _ref4 => {
38
+ let {
39
+ colour,
40
+ theme
41
+ } = _ref4;
42
+ return colour ? theme.color(colour) : theme.color('white');
25
43
  });
26
- const Chevron = _ref2 => {
44
+ const Chevron = _ref5 => {
27
45
  let {
28
46
  colour,
47
+ mobileColour,
29
48
  theme,
30
49
  size,
31
50
  direction,
32
51
  ...rest
33
- } = _ref2;
52
+ } = _ref5;
34
53
  return /*#__PURE__*/_react.default.createElement(Icon, Object.assign({
35
54
  direction: direction,
36
55
  width: size,
37
56
  height: size,
38
57
  fill: theme.color(colour),
58
+ colour: colour,
59
+ mobileColour: mobileColour,
39
60
  xmlns: "http://www.w3.org/2000/svg",
40
61
  viewBox: "0 0 48 48"
41
62
  }, rest), /*#__PURE__*/_react.default.createElement("path", {
@@ -44,6 +65,7 @@ const Chevron = _ref2 => {
44
65
  };
45
66
  Chevron.defaultProps = {
46
67
  colour: 'white',
68
+ mobileColour: null,
47
69
  size: 24,
48
70
  direction: 'up'
49
71
  };
@@ -1,23 +1,49 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.default = void 0;
8
9
  var _react = _interopRequireDefault(require("react"));
9
- var _styledComponents = require("styled-components");
10
- const Download = _ref => {
10
+ var _styledComponents = _interopRequireWildcard(require("styled-components"));
11
+ const StyledSVG = _styledComponents.default.svg.withConfig({
12
+ displayName: "Download__StyledSVG",
13
+ componentId: "sc-eoa7se-0"
14
+ })(["fill:", ";@media ", "{fill:", ";}"], _ref => {
11
15
  let {
16
+ mobileColour,
12
17
  colour,
18
+ theme
19
+ } = _ref;
20
+ return mobileColour ? theme.color(mobileColour) : theme.color(colour);
21
+ }, _ref2 => {
22
+ let {
23
+ theme
24
+ } = _ref2;
25
+ return theme.breakpoint('medium');
26
+ }, _ref3 => {
27
+ let {
28
+ colour,
29
+ theme
30
+ } = _ref3;
31
+ return colour ? theme.color(colour) : theme.color('white');
32
+ });
33
+ const Download = _ref4 => {
34
+ let {
35
+ colour,
36
+ mobileColour,
13
37
  theme,
14
38
  size,
15
39
  ...rest
16
- } = _ref;
17
- return /*#__PURE__*/_react.default.createElement("svg", Object.assign({}, rest, {
40
+ } = _ref4;
41
+ return /*#__PURE__*/_react.default.createElement(StyledSVG, Object.assign({}, rest, {
18
42
  width: size,
19
43
  height: size,
20
44
  fill: theme.color(colour),
45
+ colour: colour,
46
+ mobileColour: mobileColour,
21
47
  xmlns: "http://www.w3.org/2000/svg",
22
48
  viewBox: "0 0 96 96"
23
49
  }), /*#__PURE__*/_react.default.createElement("path", {
@@ -26,6 +52,7 @@ const Download = _ref => {
26
52
  };
27
53
  Download.defaultProps = {
28
54
  colour: 'white',
55
+ mobileColour: null,
29
56
  size: 24
30
57
  };
31
58
  var _default = exports.default = (0, _styledComponents.withTheme)(Download);
@@ -1,23 +1,49 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.default = void 0;
8
9
  var _react = _interopRequireDefault(require("react"));
9
- var _styledComponents = require("styled-components");
10
- const External = _ref => {
10
+ var _styledComponents = _interopRequireWildcard(require("styled-components"));
11
+ const StyledSVG = _styledComponents.default.svg.withConfig({
12
+ displayName: "External__StyledSVG",
13
+ componentId: "sc-oha23y-0"
14
+ })(["fill:", ";@media ", "{fill:", ";}"], _ref => {
11
15
  let {
16
+ mobileColour,
12
17
  colour,
18
+ theme
19
+ } = _ref;
20
+ return mobileColour ? theme.color(mobileColour) : theme.color(colour);
21
+ }, _ref2 => {
22
+ let {
23
+ theme
24
+ } = _ref2;
25
+ return theme.breakpoint('medium');
26
+ }, _ref3 => {
27
+ let {
28
+ colour,
29
+ theme
30
+ } = _ref3;
31
+ return colour ? theme.color(colour) : theme.color('white');
32
+ });
33
+ const External = _ref4 => {
34
+ let {
35
+ colour,
36
+ mobileColour,
13
37
  theme,
14
38
  size,
15
39
  ...rest
16
- } = _ref;
17
- return /*#__PURE__*/_react.default.createElement("svg", Object.assign({}, rest, {
40
+ } = _ref4;
41
+ return /*#__PURE__*/_react.default.createElement(StyledSVG, Object.assign({}, rest, {
18
42
  width: size,
19
43
  height: size,
20
44
  fill: theme.color(colour),
45
+ colour: colour,
46
+ mobileColour: mobileColour,
21
47
  xmlns: "http://www.w3.org/2000/svg",
22
48
  viewBox: "0 0 96 96"
23
49
  }), /*#__PURE__*/_react.default.createElement("path", {
@@ -26,6 +52,7 @@ const External = _ref => {
26
52
  };
27
53
  External.defaultProps = {
28
54
  colour: 'white',
55
+ mobileColour: null,
29
56
  size: 24
30
57
  };
31
58
  var _default = exports.default = (0, _styledComponents.withTheme)(External);
@@ -1,23 +1,49 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.default = void 0;
8
9
  var _react = _interopRequireDefault(require("react"));
9
- var _styledComponents = require("styled-components");
10
- const Favourite = _ref => {
10
+ var _styledComponents = _interopRequireWildcard(require("styled-components"));
11
+ const StyledSVG = _styledComponents.default.svg.withConfig({
12
+ displayName: "Favourite__StyledSVG",
13
+ componentId: "sc-16rqg62-0"
14
+ })(["fill:", ";@media ", "{fill:", ";}"], _ref => {
11
15
  let {
16
+ mobileColour,
12
17
  colour,
18
+ theme
19
+ } = _ref;
20
+ return mobileColour ? theme.color(mobileColour) : theme.color(colour);
21
+ }, _ref2 => {
22
+ let {
23
+ theme
24
+ } = _ref2;
25
+ return theme.breakpoint('medium');
26
+ }, _ref3 => {
27
+ let {
28
+ colour,
29
+ theme
30
+ } = _ref3;
31
+ return colour ? theme.color(colour) : theme.color('white');
32
+ });
33
+ const Favourite = _ref4 => {
34
+ let {
35
+ colour,
36
+ mobileColour,
13
37
  theme,
14
38
  size,
15
39
  ...rest
16
- } = _ref;
17
- return /*#__PURE__*/_react.default.createElement("svg", Object.assign({}, rest, {
40
+ } = _ref4;
41
+ return /*#__PURE__*/_react.default.createElement(StyledSVG, Object.assign({}, rest, {
18
42
  width: size,
19
43
  height: size,
20
44
  fill: theme.color(colour),
45
+ colour: colour,
46
+ mobileColour: mobileColour,
21
47
  xmlns: "http://www.w3.org/2000/svg",
22
48
  viewBox: "0 0 96 96"
23
49
  }), /*#__PURE__*/_react.default.createElement("path", {
@@ -26,6 +52,7 @@ const Favourite = _ref => {
26
52
  };
27
53
  Favourite.defaultProps = {
28
54
  colour: 'white',
55
+ mobileColour: null,
29
56
  size: 24
30
57
  };
31
58
  var _default = exports.default = (0, _styledComponents.withTheme)(Favourite);
@@ -1,23 +1,49 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.default = void 0;
8
9
  var _react = _interopRequireDefault(require("react"));
9
- var _styledComponents = require("styled-components");
10
- const Internal = _ref => {
10
+ var _styledComponents = _interopRequireWildcard(require("styled-components"));
11
+ const StyledSVG = _styledComponents.default.svg.withConfig({
12
+ displayName: "Internal__StyledSVG",
13
+ componentId: "sc-166yk4t-0"
14
+ })(["fill:", ";@media ", "{fill:", ";}"], _ref => {
11
15
  let {
16
+ mobileColour,
12
17
  colour,
18
+ theme
19
+ } = _ref;
20
+ return mobileColour ? theme.color(mobileColour) : theme.color(colour);
21
+ }, _ref2 => {
22
+ let {
23
+ theme
24
+ } = _ref2;
25
+ return theme.breakpoint('medium');
26
+ }, _ref3 => {
27
+ let {
28
+ colour,
29
+ theme
30
+ } = _ref3;
31
+ return colour ? theme.color(colour) : theme.color('white');
32
+ });
33
+ const Internal = _ref4 => {
34
+ let {
35
+ colour,
36
+ mobileColour,
13
37
  theme,
14
38
  size,
15
39
  ...rest
16
- } = _ref;
17
- return /*#__PURE__*/_react.default.createElement("svg", Object.assign({}, rest, {
40
+ } = _ref4;
41
+ return /*#__PURE__*/_react.default.createElement(StyledSVG, Object.assign({}, rest, {
18
42
  width: size,
19
43
  height: size,
20
44
  fill: theme.color(colour),
45
+ colour: colour,
46
+ mobileColour: mobileColour,
21
47
  xmlns: "http://www.w3.org/2000/svg",
22
48
  viewBox: "0 0 96 96"
23
49
  }), /*#__PURE__*/_react.default.createElement("path", {
@@ -26,6 +52,7 @@ const Internal = _ref => {
26
52
  };
27
53
  Internal.defaultProps = {
28
54
  colour: 'white',
55
+ mobileColour: null,
29
56
  size: 24
30
57
  };
31
58
  var _default = exports.default = (0, _styledComponents.withTheme)(Internal);
@@ -15,6 +15,7 @@ const Link = _ref => {
15
15
  let {
16
16
  children,
17
17
  color,
18
+ mobileColour,
18
19
  href,
19
20
  target,
20
21
  type,
@@ -54,6 +55,7 @@ const Link = _ref => {
54
55
  }, []);
55
56
  return /*#__PURE__*/_react.default.createElement(_Link.default, Object.assign({}, rest, {
56
57
  color: color,
58
+ mobileColour: mobileColour,
57
59
  href: href,
58
60
  target: window,
59
61
  type: type,
@@ -66,6 +68,7 @@ const Link = _ref => {
66
68
  Link.defaultProps = {
67
69
  type: 'standard',
68
70
  color: 'red',
71
+ mobileColour: null,
69
72
  target: null,
70
73
  home: false,
71
74
  underline: true,
@@ -40,24 +40,26 @@ import { External, Download, Favourite, Internal, Chevron, Arrow, AtSign } from
40
40
  <div style={{ display: 'block', marginBottom: '10px' }}>
41
41
  <Link
42
42
  color="red"
43
+ mobileColour="blue"
43
44
  href="#anchor"
44
45
  target="blank"
45
46
  type="button"
46
- icon={<Internal colour="white" />}
47
+ icon={<Internal colour="white" mobileColour="red"/>}
47
48
  >
48
- Internal link
49
+ Internal link, 'blue' with red icon on tablet and mobile
49
50
  </Link>
50
51
  </div>
51
52
 
52
53
  <div style={{ display: 'block', marginBottom: '10px' }}>
53
54
  <Link
54
- color="red"
55
+ color="blue"
56
+ mobileColour="black"
55
57
  href="#anchor"
56
58
  target="blank"
57
59
  type="button"
58
- icon={<External colour="white" />}
60
+ icon={<External colour="white" mobileColour="blue" />}
59
61
  >
60
- External link
62
+ External link (black on mobile, blue on desktop)
61
63
  </Link>
62
64
  </div>
63
65
 
@@ -67,9 +69,9 @@ import { External, Download, Favourite, Internal, Chevron, Arrow, AtSign } from
67
69
  href="#anchor"
68
70
  target="blank"
69
71
  type="button"
70
- icon={<Download colour="white" />}
72
+ icon={<Download colour="white" mobileColour="blue" />}
71
73
  >
72
- Download link
74
+ Download link (blue mobile-tablet icon, white desktop icon)
73
75
  </Link>
74
76
  </div>
75
77
 
@@ -79,9 +81,9 @@ import { External, Download, Favourite, Internal, Chevron, Arrow, AtSign } from
79
81
  href="#anchor"
80
82
  target="blank"
81
83
  type="button"
82
- icon={<Favourite colour="white" />}
84
+ icon={<Favourite colour="white" mobileColour="blue" />}
83
85
  >
84
- Favourite link
86
+ Favourite link (blue mobile-tablet icon, white desktop icon)
85
87
  </Link>
86
88
  </div>
87
89
 
@@ -91,9 +93,9 @@ import { External, Download, Favourite, Internal, Chevron, Arrow, AtSign } from
91
93
  href="#anchor"
92
94
  target="blank"
93
95
  type="button"
94
- icon={<Chevron direction="up" colour="white" />}
96
+ icon={<Chevron direction="up" colour="white" mobileColour="blue" />}
95
97
  >
96
- Chevron Up
98
+ Chevron Up (blue mobile-tablet icon, white desktop icon)
97
99
  </Link>
98
100
  </div>
99
101
 
@@ -103,9 +105,9 @@ import { External, Download, Favourite, Internal, Chevron, Arrow, AtSign } from
103
105
  href="#anchor"
104
106
  target="blank"
105
107
  type="button"
106
- icon={<Chevron direction="down" colour="white" />}
108
+ icon={<Chevron direction="down" colour="white" mobileColour="blue" />}
107
109
  >
108
- Chevron Down
110
+ Chevron Down (blue mobile-tablet icon, white desktop icon)
109
111
  </Link>
110
112
  </div>
111
113
 
@@ -115,9 +117,9 @@ import { External, Download, Favourite, Internal, Chevron, Arrow, AtSign } from
115
117
  href="#anchor"
116
118
  target="blank"
117
119
  type="button"
118
- icon={<Chevron direction="left" colour="white" />}
120
+ icon={<Chevron direction="left" colour="white" mobileColour="blue" />}
119
121
  >
120
- Chevron Left
122
+ Chevron Left (blue mobile-tablet icon, white desktop icon)
121
123
  </Link>
122
124
  </div>
123
125
 
@@ -127,9 +129,9 @@ import { External, Download, Favourite, Internal, Chevron, Arrow, AtSign } from
127
129
  href="#anchor"
128
130
  target="blank"
129
131
  type="button"
130
- icon={<Chevron direction="right" colour="white" />}
132
+ icon={<Chevron direction="right" colour="white" mobileColour="blue" />}
131
133
  >
132
- Chevron Right
134
+ Chevron Right (blue mobile-tablet icon, white desktop icon)
133
135
  </Link>
134
136
  </div>
135
137
 
@@ -140,9 +142,9 @@ import { External, Download, Favourite, Internal, Chevron, Arrow, AtSign } from
140
142
  target="blank"
141
143
  type="button"
142
144
  iconFirst
143
- icon={<Arrow direction="left" colour="white" />}
145
+ icon={<Arrow direction="left" colour="white" mobileColour="blue" />}
144
146
  >
145
- Arrow Left
147
+ Arrow Left (blue mobile-tablet icon, white desktop icon)
146
148
  </Link>
147
149
  </div>
148
150
 
@@ -152,9 +154,9 @@ import { External, Download, Favourite, Internal, Chevron, Arrow, AtSign } from
152
154
  href="#anchor"
153
155
  target="blank"
154
156
  type="button"
155
- icon={<AtSign />}
157
+ icon={<AtSign colour="white" mobileColour="blue" />}
156
158
  >
157
- At Sign
159
+ At Sign (blue mobile-tablet icon, white desktop icon)
158
160
  </Link>
159
161
  </div>
160
162
  </div>;
@@ -9,7 +9,7 @@ exports.default = exports.IconWrapper = exports.HelperText = void 0;
9
9
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
10
10
  var _spacing = _interopRequireDefault(require("../../../theme/shared/spacing"));
11
11
  var _hideVisually = _interopRequireDefault(require("../../../theme/shared/hideVisually"));
12
- const buttonStyle = () => (0, _styledComponents.css)(["display:inline-flex;position:relative;padding:0.5rem 1.25rem;text-decoration:none;font-weight:700;font-size:", ";border-radius:2rem;transition:all 0.3s;height:3.125rem;width:100%;justify-content:center;align-items:center;cursor:pointer;", ";@media ", "{width:auto;}"], _ref => {
12
+ const buttonStyle = () => (0, _styledComponents.css)(["display:inline-flex;position:relative;padding:0.5rem 1.25rem;text-decoration:none;font-weight:700;font-size:", ";border-radius:2rem;transition:all 0.3s;height:3.125rem;width:100%;justify-content:center;align-items:center;cursor:pointer;", ";", ";@media ", "{width:auto;}@media ", "{", ";}"], _ref => {
13
13
  let {
14
14
  theme
15
15
  } = _ref;
@@ -22,49 +22,66 @@ const buttonStyle = () => (0, _styledComponents.css)(["display:inline-flex;posit
22
22
  return color ? theme.buttonColors(color) : theme.buttonColors('red');
23
23
  }, _ref3 => {
24
24
  let {
25
+ mobileColour,
25
26
  theme
26
27
  } = _ref3;
28
+ return mobileColour ? theme.buttonColors(mobileColour) : null;
29
+ }, _ref4 => {
30
+ let {
31
+ theme
32
+ } = _ref4;
27
33
  return theme.breakpoint('small');
34
+ }, _ref5 => {
35
+ let {
36
+ theme
37
+ } = _ref5;
38
+ return theme.breakpoint('medium');
39
+ }, _ref6 => {
40
+ let {
41
+ color,
42
+ theme
43
+ } = _ref6;
44
+ return color ? theme.buttonColors(color) : theme.buttonColors('red');
28
45
  });
29
- const linkStyle = () => (0, _styledComponents.css)(["position:relative;text-decoration:none;display:inline;line-height:", ";", ";"], _ref4 => {
46
+ const linkStyle = () => (0, _styledComponents.css)(["position:relative;text-decoration:none;display:inline;line-height:", ";", ";"], _ref7 => {
30
47
  let {
31
48
  theme
32
- } = _ref4;
49
+ } = _ref7;
33
50
  return theme.fontSize('l');
34
- }, _ref5 => {
51
+ }, _ref8 => {
35
52
  let {
36
53
  type,
37
54
  theme,
38
55
  underline
39
- } = _ref5;
56
+ } = _ref8;
40
57
  return type ? theme.linkStyles(type, underline) : theme.linkStyles('standard', underline);
41
58
  });
42
59
  const IconWrapper = exports.IconWrapper = _styledComponents.default.span.withConfig({
43
60
  displayName: "Linkstyle__IconWrapper",
44
61
  componentId: "sc-t360tr-0"
45
- })(["display:inline-flex;margin-left:", ";align-self:center;right:", ";", ";@media ", "{width:auto;right:auto;position:relative;", ";}"], (0, _spacing.default)('md'), (0, _spacing.default)('m'), _ref6 => {
62
+ })(["display:inline-flex;margin-left:", ";align-self:center;right:", ";", ";@media ", "{width:auto;right:auto;position:relative;", ";}"], (0, _spacing.default)('md'), (0, _spacing.default)('m'), _ref9 => {
46
63
  let {
47
64
  type
48
- } = _ref6;
65
+ } = _ref9;
49
66
  return type === 'standard' && (0, _styledComponents.css)(["position:absolute;right:-2rem;top:0;bottom:0;"]);
50
- }, _ref7 => {
67
+ }, _ref10 => {
51
68
  let {
52
69
  theme
53
- } = _ref7;
70
+ } = _ref10;
54
71
  return theme.breakpoint('small');
55
- }, _ref8 => {
72
+ }, _ref11 => {
56
73
  let {
57
74
  type
58
- } = _ref8;
75
+ } = _ref11;
59
76
  return type === 'standard' && (0, _styledComponents.css)(["position:absolute;right:-2rem;top:0;bottom:0;"]);
60
77
  });
61
78
  const StyledLink = _styledComponents.default.a.withConfig({
62
79
  displayName: "Linkstyle__StyledLink",
63
80
  componentId: "sc-t360tr-1"
64
- })(["", " ", ";"], props => props.type === 'button' ? buttonStyle : linkStyle, _ref9 => {
81
+ })(["", " ", ";"], props => props.type === 'button' ? buttonStyle : linkStyle, _ref12 => {
65
82
  let {
66
83
  iconFirst
67
- } = _ref9;
84
+ } = _ref12;
68
85
  return iconFirst && (0, _styledComponents.css)(["flex-direction:row-reverse;span[type=\"button\"]{margin-left:0;margin-right:1rem;}"]);
69
86
  });
70
87
  const HelperText = exports.HelperText = _styledComponents.default.span.withConfig({