@comicrelief/component-library 8.83.1 → 8.84.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 (44) hide show
  1. package/dist/index.cjs.js +1227 -859
  2. package/dist/index.es.js +10902 -10144
  3. package/package.json +1 -1
  4. package/src/App.styles.js +2 -2
  5. package/src/components/Atoms/Button/Button.js +13 -3
  6. package/src/components/Atoms/Button/Button.style.js +19 -1
  7. package/src/components/Atoms/Button/Button.test.js +1 -1
  8. package/src/components/Atoms/Button/ButtonExample.jsx +24 -0
  9. package/src/components/Atoms/ButtonWithStates/ButtonWithStates.js +1 -1
  10. package/src/components/Atoms/Icons/Cross.js +0 -1
  11. package/src/components/Atoms/Icons/Download.js +4 -4
  12. package/src/components/Atoms/Icons/External.js +4 -4
  13. package/src/components/Atoms/Icons/Filter.js +50 -0
  14. package/src/components/Atoms/Icons/IconsExample.jsx +9 -5
  15. package/src/components/Atoms/Icons/Undo.js +44 -0
  16. package/src/components/Atoms/Icons/index.js +2 -0
  17. package/src/components/Atoms/Link/Link.test.js +1 -1
  18. package/src/components/Atoms/Link/LinkExample.jsx +4 -2
  19. package/src/components/Atoms/Text/TextExample.jsx +338 -130
  20. package/src/components/Molecules/CardDs/__snapshots__/CardDs.test.js.snap +2 -2
  21. package/src/components/Molecules/Promo/__snapshots__/Promo.test.js.snap +2 -2
  22. package/src/components/Molecules/QuoteSlice/__snapshots__/QuoteSlice.test.js.snap +1 -1
  23. package/src/components/Molecules/SingleMessage/__snapshots__/SingleMessage.test.js.snap +2 -2
  24. package/src/components/Molecules/SingleMessageDS/__snapshots__/SingleMessageDs.test.js.snap +1 -3
  25. package/src/components/Organisms/CookieBanner/CookieBanner.test.js +1 -1
  26. package/src/components/Organisms/EmailBanner/__snapshots__/EmailBanner.test.js.snap +12 -12
  27. package/src/components/Organisms/EmailSignUp/__snapshots__/EmailSignUp.test.js.snap +3 -3
  28. package/src/components/Organisms/FilterCard/FilterCard.js +286 -0
  29. package/src/components/Organisms/FilterCard/FilterCard.style.js +425 -0
  30. package/src/components/Organisms/FilterCard/FilterCard.test.js +60 -0
  31. package/src/components/Organisms/FilterCard/FilterCardExample.jsx +48 -0
  32. package/src/components/Organisms/FilterCard/FilterCardNodes.js +155 -0
  33. package/src/components/Organisms/FilterCard/__snapshots__/FilterCard.test.js.snap +1006 -0
  34. package/src/components/Organisms/FilterCard/_utils/_utils.js +57 -0
  35. package/src/components/Organisms/FilterCard/assets/Rectangle.svg +3 -0
  36. package/src/components/Organisms/FooterNew/__snapshots__/FooterNew.test.js.snap +4 -4
  37. package/src/components/Organisms/MarketingPreferencesDS/MarketingPreferencesDS.style.js +1 -1
  38. package/src/data/TestFilterCardNodeData.js +930 -0
  39. package/src/data/data.js +64 -1
  40. package/src/data/test-icons/Children--black.svg +5 -0
  41. package/src/data/test-icons/Children--white.svg +5 -0
  42. package/src/demos/index.jsx +31 -9
  43. package/src/index.js +1 -0
  44. package/src/theme/crTheme/buttonColors.js +3 -4
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.83.1",
4
+ "version": "8.84.0",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",
7
7
  "files": [
package/src/App.styles.js CHANGED
@@ -55,7 +55,7 @@ export const SidebarItem = styled.button`
55
55
  export const Preview = styled.main`
56
56
  flex: 1;
57
57
  overflow-y: auto;
58
- padding: 2rem;
58
+ padding: ${import.meta.env.VITE_REMOVE_PADDING === 'true' ? '0' : '2rem'};
59
59
  background: ${color('grey_light')};
60
60
  `;
61
61
 
@@ -78,7 +78,7 @@ export const PreviewBox = styled.div`
78
78
  background: ${color('white')};
79
79
  border: 1px solid ${color('grey_medium')};
80
80
  border-radius: 6px;
81
- padding: 2rem;
81
+ padding: ${import.meta.env.VITE_REMOVE_PADDING === 'true' ? '0' : '2rem'};
82
82
  `;
83
83
 
84
84
  export const Logo = styled.div`
@@ -8,7 +8,9 @@ const Button = React.forwardRef(({
8
8
  children,
9
9
  color = 'red',
10
10
  icon = null,
11
- iconDescription = 'Icon',
11
+ iconDescription = '',
12
+ iconLeft = false,
13
+ iconKey = '',
12
14
  wrapper = false,
13
15
  fullWidth = false,
14
16
  buttonType = buttonTypes.PRIMARY,
@@ -19,7 +21,6 @@ const Button = React.forwardRef(({
19
21
 
20
22
  return (
21
23
  <StyledButton
22
- {...rest}
23
24
  as={wrapper ? 'span' : 'button'}
24
25
  ref={ref}
25
26
  $fullWidth={fullWidth}
@@ -27,6 +28,8 @@ const Button = React.forwardRef(({
27
28
  $buttonType={buttonType}
28
29
  data-testid="Button"
29
30
  $hasIcon={hasIcon}
31
+ $iconLeft={iconLeft}
32
+ {...rest}
30
33
  >
31
34
 
32
35
  {hasIcon
@@ -36,7 +39,12 @@ const Button = React.forwardRef(({
36
39
  }
37
40
 
38
41
  {hasIcon && (
39
- <IconWrapper className="icon-wrapper">
42
+ <IconWrapper
43
+ // Allows us to force a re-render (to avoid flashing when switching img srcs)
44
+ // by passing a dynamically-set `iconKey` prop, based on when that src is switched:
45
+ key={`${children}-${iconKey}`}
46
+ className="icon-wrapper"
47
+ >
40
48
  {hasIconPath ? (
41
49
  <Picture
42
50
  image={icon}
@@ -63,6 +71,8 @@ Button.propTypes = {
63
71
  PropTypes.string
64
72
  ]),
65
73
  iconDescription: PropTypes.string,
74
+ iconLeft: PropTypes.bool,
75
+ iconKey: PropTypes.string,
66
76
  // Primary will the default for the vast majority of contexts; with
67
77
  // Secondary and Tertirary being manually set by developers where required
68
78
  buttonType: PropTypes.oneOf([
@@ -51,7 +51,7 @@ const StyledButton = styled.button`
51
51
  width: ${({ $fullWidth }) => ($fullWidth ? '100%' : 'auto')};
52
52
  }
53
53
 
54
- ${({ $hasIcon }) => $hasIcon && css`
54
+ ${({ $hasIcon, $iconLeft }) => $hasIcon && css`
55
55
  display: inline-grid;
56
56
  grid-template-columns: 1fr repeat(1, auto) 1fr;
57
57
  grid-column-gap: 0.6rem;
@@ -74,6 +74,24 @@ const StyledButton = styled.button`
74
74
  // icon, to prevent silliness:
75
75
  height: calc(3rem - (var(--padding-top-and-bottom) * 2));
76
76
  }
77
+
78
+ ${($iconLeft && css`
79
+ > ${Copywrapper} {
80
+ order: 2;
81
+
82
+ ${({ $fullWidth }) => (!$fullWidth && css`
83
+ // Swap sides for the 'aesthetic rebalance' mentioned aobve:
84
+ padding-inline: 1.5rem 0;
85
+ `)};
86
+ }
87
+
88
+ > ${IconWrapper} {
89
+ // Place the icon before the copy in the Grid:
90
+ order: 1;
91
+ // Swap other alignment rule:
92
+ margin-inline: 0 auto;
93
+ }
94
+ `)};
77
95
  `}
78
96
  `;
79
97
 
@@ -49,7 +49,7 @@ it('renders a standard styled link correctly', () => {
49
49
 
50
50
  .c0:disabled {
51
51
  cursor: not-allowed;
52
- opacity: 0.5;
52
+ opacity: 0.35;
53
53
  }
54
54
 
55
55
  @media (min-width: 740px) {
@@ -154,6 +154,17 @@ export default function ButtonExample() {
154
154
  </Button>
155
155
  </ExampleContainer>
156
156
 
157
+ <ExampleContainer>
158
+ <Button
159
+ type="button"
160
+ icon={ButtonIconImgPath}
161
+ iconDescription="House with a heart-shaped window"
162
+ iconLeft
163
+ >
164
+ Button w/image URL for (left-aligned) icon
165
+ </Button>
166
+ </ExampleContainer>
167
+
157
168
  <ExampleContainer>
158
169
  <Button
159
170
  type="button"
@@ -224,6 +235,19 @@ export default function ButtonExample() {
224
235
  </Button>
225
236
  </ExampleContainer>
226
237
 
238
+ <ExampleContainer>
239
+ <Button
240
+ type="button"
241
+ icon={testSvgImg}
242
+ fullWidth
243
+ iconDescription="Phone icon"
244
+ color="blue"
245
+ iconLeft
246
+ >
247
+ Blue full-width Button w/svg URL, rendered as (left-aligned)
248
+ </Button>
249
+ </ExampleContainer>
250
+
227
251
  <br />
228
252
  <h3>Button variants with Icons</h3>
229
253
 
@@ -8,7 +8,7 @@ import Button from '../Button/Button';
8
8
  const ButtonWithDisabledState = styled(Button)`
9
9
  &:disabled {
10
10
  cursor: not-allowed;
11
- opacity: 0.5;
11
+ opacity: 0.35;
12
12
  }
13
13
  `;
14
14
 
@@ -10,7 +10,6 @@ const Icon = styled.svg`
10
10
  @media ${({ theme }) => theme.allBreakpoints('L')} {
11
11
  fill: ${({ $colour, theme }) => ($colour ? theme.color($colour) : theme.color('white'))};
12
12
  }
13
-
14
13
  `;
15
14
 
16
15
  const Cross = ({
@@ -4,11 +4,11 @@ import styled, { withTheme } from 'styled-components';
4
4
 
5
5
  const StyledSVG = styled.svg`
6
6
  // Mobile-colour if available, else use standard prop
7
- fill: ${({ mobileColour, colour, theme }) => (mobileColour ? theme.color(mobileColour) : theme.color(colour))};
7
+ fill: ${({ $mobileColour, $colour, theme }) => ($mobileColour ? theme.color($mobileColour) : theme.color($colour))};
8
8
 
9
9
  // Reinstate standard styles for 'desktop', adding a fallback for good measure:
10
10
  @media ${({ theme }) => theme.allBreakpoints('L')} {
11
- fill: ${({ colour, theme }) => (colour ? theme.color(colour) : theme.color('white'))};
11
+ fill: ${({ $colour, theme }) => ($colour ? theme.color($colour) : theme.color('white'))};
12
12
  }
13
13
  `;
14
14
 
@@ -20,8 +20,8 @@ const Download = ({
20
20
  width={size}
21
21
  height={size}
22
22
  fill={theme.color(colour)}
23
- colour={colour}
24
- mobileColour={mobileColour}
23
+ $colour={colour}
24
+ $mobileColour={mobileColour}
25
25
  xmlns="http://www.w3.org/2000/svg"
26
26
  viewBox="0 0 96 96"
27
27
  >
@@ -4,11 +4,11 @@ import styled, { withTheme } from 'styled-components';
4
4
 
5
5
  const StyledSVG = styled.svg`
6
6
  // Mobile-colour if available, else use standard prop
7
- fill: ${({ mobileColour, colour, theme }) => (mobileColour ? theme.color(mobileColour) : theme.color(colour))};
7
+ fill: ${({ $mobileColour, $colour, theme }) => ($mobileColour ? theme.color($mobileColour) : theme.color($colour))};
8
8
 
9
9
  // Reinstate standard styles for 'desktop', adding a fallback for good measure:
10
10
  @media ${({ theme }) => theme.allBreakpoints('L')} {
11
- fill: ${({ colour, theme }) => (colour ? theme.color(colour) : theme.color('white'))};
11
+ fill: ${({ $colour, theme }) => ($colour ? theme.color($colour) : theme.color('white'))};
12
12
  }
13
13
  `;
14
14
 
@@ -20,8 +20,8 @@ const External = ({
20
20
  width={size}
21
21
  height={size}
22
22
  fill={theme.color(colour)}
23
- colour={colour}
24
- mobileColour={mobileColour}
23
+ $colour={colour}
24
+ $mobileColour={mobileColour}
25
25
  xmlns="http://www.w3.org/2000/svg"
26
26
  viewBox="0 0 96 96"
27
27
  >
@@ -0,0 +1,50 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import styled, { withTheme } from 'styled-components';
4
+
5
+ const Icon = styled.svg`
6
+ // Mobile-colour if available, else use standard prop
7
+ fill: ${({ $mobileColour, $colour, theme }) => ($mobileColour ? theme.color($mobileColour) : theme.color($colour))};
8
+
9
+ // Reinstate standard styles for 'desktop', adding a fallback for good measure:
10
+ @media ${({ theme }) => theme.allBreakpoints('L')} {
11
+ fill: ${({ $colour, theme }) => ($colour ? theme.color($colour) : theme.color('white'))};
12
+ }
13
+ `;
14
+
15
+ const Filter = ({
16
+ colour = 'black',
17
+ mobileColour = null,
18
+ theme,
19
+ size = 24,
20
+ ...rest
21
+ }) => (
22
+ <Icon
23
+ width={size}
24
+ height={size}
25
+ $colour={colour}
26
+ $mobileColour={mobileColour}
27
+ xmlns="http://www.w3.org/2000/svg"
28
+ viewBox="0 0 17 17"
29
+ {...rest}
30
+ >
31
+ <g clipPath="url(#clip0_2092_16160)">
32
+ <path d="M0.515625 2.90892H8.36618C8.60278 3.9859 9.56455 4.79443 10.7116 4.79443C11.8586 4.79443 12.8203 3.98593 13.0569 2.90892H15.9844C16.2691 2.90892 16.5 2.67805 16.5 2.39329C16.5 2.10854 16.2691 1.87767 15.9844 1.87767H13.0567C12.8196 0.801235 11.8565 -0.0078125 10.7116 -0.0078125C9.56597 -0.0078125 8.60333 0.801107 8.36637 1.87767H0.515625C0.230871 1.87767 0 2.10854 0 2.39329C0 2.67805 0.230871 2.90892 0.515625 2.90892ZM9.34174 2.39465C9.34174 2.39281 9.34177 2.39094 9.34177 2.3891C9.34403 1.63606 9.95849 1.02347 10.7116 1.02347C11.4636 1.02347 12.0781 1.63523 12.0813 2.38791L12.0814 2.39548C12.0802 3.14981 11.4662 3.76321 10.7116 3.76321C9.95727 3.76321 9.34342 3.15042 9.34171 2.39655L9.34174 2.39465ZM15.9844 13.5914H13.0567C12.8196 12.515 11.8565 11.7059 10.7116 11.7059C9.56597 11.7059 8.60333 12.5149 8.36637 13.5914H0.515625C0.230871 13.5914 0 13.8222 0 14.107C0 14.3918 0.230871 14.6227 0.515625 14.6227H8.36618C8.60278 15.6996 9.56455 16.5082 10.7116 16.5082C11.8586 16.5082 12.8203 15.6996 13.0569 14.6227H15.9844C16.2691 14.6227 16.5 14.3918 16.5 14.107C16.5 13.8222 16.2691 13.5914 15.9844 13.5914ZM10.7116 15.4769C9.95727 15.4769 9.34342 14.8641 9.34171 14.1103L9.34174 14.1084C9.34174 14.1065 9.34177 14.1047 9.34177 14.1028C9.34403 13.3498 9.95849 12.7372 10.7116 12.7372C11.4636 12.7372 12.0781 13.3489 12.0813 14.1016L12.0814 14.1092C12.0803 14.8636 11.4662 15.4769 10.7116 15.4769ZM15.9844 7.73455H8.13382C7.89722 6.65758 6.93545 5.84908 5.78844 5.84908C4.64143 5.84908 3.67966 6.65758 3.44305 7.73455H0.515625C0.230871 7.73455 0 7.96543 0 8.25018C0 8.53497 0.230871 8.7658 0.515625 8.7658H3.44331C3.6804 9.8422 4.64346 10.6513 5.78844 10.6513C6.93403 10.6513 7.89667 9.84233 8.13363 8.7658H15.9844C16.2691 8.7658 16.5 8.53497 16.5 8.25018C16.5 7.96543 16.2691 7.73455 15.9844 7.73455ZM7.15826 8.24883C7.15826 8.2507 7.15823 8.25253 7.15823 8.25437C7.15597 9.00741 6.54151 9.62 5.78844 9.62C5.03643 9.62 4.42194 9.00824 4.41868 8.25559L4.41858 8.24805C4.41971 7.49363 5.03379 6.88033 5.78844 6.88033C6.54273 6.88033 7.15658 7.49308 7.15829 8.24699L7.15826 8.24883Z" fill={colour} />
33
+ </g>
34
+ <defs>
35
+ <clipPath id="clip0_2092_16160">
36
+ <rect width={size} height={size} fill={colour} />
37
+ </clipPath>
38
+ </defs>
39
+ </Icon>
40
+ );
41
+
42
+ Filter.propTypes = {
43
+ colour: PropTypes.string,
44
+ mobileColour: PropTypes.string,
45
+ size: PropTypes.number,
46
+ direction: PropTypes.oneOf(['up', 'down', 'left', 'right']),
47
+ theme: PropTypes.objectOf(PropTypes.shape).isRequired
48
+ };
49
+
50
+ export default withTheme(Filter);
@@ -1,6 +1,8 @@
1
1
  import React from 'react';
2
2
  import styled from 'styled-components';
3
- import { Arrow, AtSign, Chevron, CtaArrow, Download, External, Favourite, Internal, Post } from './index';
3
+ import {
4
+ Arrow, AtSign, Chevron, CtaArrow, Download, External, Favourite, Internal, Post, Filter, Undo
5
+ } from './index';
4
6
  import Cross from './Cross';
5
7
  import Curve from './Curve';
6
8
  import { ExampleContainer } from '../../../demos/SharedStyles';
@@ -21,12 +23,12 @@ const IconCard = styled.div`
21
23
  border: 1px solid #e1e2e3;
22
24
  border-radius: 6px;
23
25
  min-width: 100px;
24
- background: ${({ dark }) => dark ? '#222' : '#fff'};
26
+ background: ${({ $dark }) => ($dark ? '#222' : '#fff')};
25
27
  `;
26
28
 
27
29
  const Name = styled.p`
28
30
  font-size: 0.75rem;
29
- color: ${({ dark }) => dark ? '#fff' : '#333'};
31
+ color: ${({ $dark }) => ($dark ? '#fff' : '#333')};
30
32
  margin: 0;
31
33
  text-align: center;
32
34
  `;
@@ -49,6 +51,8 @@ export default function IconsExample() {
49
51
  ['AtSign', <AtSign size={48} colour="black" />],
50
52
  ['Cross', <Cross size={48} colour="black" />],
51
53
  ['Post', <Post size={48} colour="black" />],
54
+ ['Filter', <Filter size={48} colour="black" />],
55
+ ['Undo', <Undo size={48} colour="black" />]
52
56
  ].map(([name, icon]) => (
53
57
  <IconCard key={name}>
54
58
  {icon}
@@ -86,9 +90,9 @@ export default function IconsExample() {
86
90
  <h3>CtaArrow — directions</h3>
87
91
  <Grid>
88
92
  {directions.map(dir => (
89
- <IconCard key={dir} dark>
93
+ <IconCard key={dir} $dark>
90
94
  <CtaArrow size={48} colour="red" direction={dir} />
91
- <Name dark>{dir}</Name>
95
+ <Name $dark>{dir}</Name>
92
96
  </IconCard>
93
97
  ))}
94
98
  </Grid>
@@ -0,0 +1,44 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import styled, { withTheme } from 'styled-components';
4
+
5
+ const Icon = styled.svg`
6
+ // Mobile-colour if available, else use standard prop
7
+ fill: ${({ $mobileColour, $colour, theme }) => ($mobileColour ? theme.color($mobileColour) : theme.color($colour))};
8
+
9
+ // Reinstate standard styles for 'desktop', adding a fallback for good measure:
10
+ @media ${({ theme }) => theme.allBreakpoints('L')} {
11
+ fill: ${({ $colour, theme }) => ($colour ? theme.color($colour) : theme.color('white'))};
12
+ }
13
+ `;
14
+
15
+ const Undo = ({
16
+ colour = 'black',
17
+ mobileColour = null,
18
+ theme,
19
+ size = 24,
20
+ ...rest
21
+ }) => (
22
+ <Icon
23
+ width={size}
24
+ height={size}
25
+ $colour={colour}
26
+ $mobileColour={mobileColour}
27
+ xmlns="http://www.w3.org/2000/svg"
28
+ viewBox="0 0 18 18"
29
+ {...rest}
30
+ >
31
+ <path d="M7.5 6.75H3.75C3.3 6.75 3 6.45 3 6V2.25C3 1.8 3.3 1.5 3.75 1.5C4.2 1.5 4.5 1.8 4.5 2.25V5.25H7.5C7.95 5.25 8.25 5.55 8.25 6C8.25 6.45 7.95 6.75 7.5 6.75Z" fill={colour} />
32
+ <path d="M8.99844 15.7499C8.17344 15.7499 7.34844 15.5999 6.59844 15.2999C5.24844 14.7749 4.12344 13.8749 3.29844 12.6749C3.07344 12.2999 3.14844 11.8499 3.52344 11.6249C3.89844 11.3999 4.34844 11.4749 4.57344 11.8499C5.17344 12.7499 6.07344 13.4999 7.12344 13.8749C8.17344 14.2499 9.29844 14.3249 10.4234 14.0249C11.4734 13.7249 12.4484 13.0499 13.1234 12.1499C13.7984 11.2499 14.1734 10.1999 14.2484 9.0749C14.2484 7.9499 13.9484 6.8249 13.2734 5.9249C12.5984 5.0249 11.6984 4.3499 10.6484 3.9749C9.59844 3.5999 8.47344 3.5999 7.34844 3.9749C6.29844 4.3499 5.39844 5.0249 4.72344 5.9249C4.49844 6.2999 4.04844 6.3749 3.67344 6.1499C3.29844 5.9249 3.22344 5.3999 3.52344 5.0999C4.34844 3.8999 5.54844 2.9999 6.89844 2.5499C8.24844 2.0999 9.74844 2.0999 11.0984 2.5499C12.4484 2.9999 13.6484 3.8999 14.4734 5.0999C15.2984 6.2999 15.7484 7.6499 15.6734 9.1499C15.6734 10.5749 15.1484 11.9999 14.2484 13.1249C13.3484 14.2499 12.1484 15.0749 10.7234 15.5249C10.2734 15.6749 9.59844 15.7499 8.99844 15.7499Z" fill={colour} />
33
+ </Icon>
34
+ );
35
+
36
+ Undo.propTypes = {
37
+ colour: PropTypes.string,
38
+ mobileColour: PropTypes.string,
39
+ size: PropTypes.number,
40
+ direction: PropTypes.oneOf(['up', 'down', 'left', 'right']),
41
+ theme: PropTypes.objectOf(PropTypes.shape).isRequired
42
+ };
43
+
44
+ export default withTheme(Undo);
@@ -7,3 +7,5 @@ export { default as Arrow } from './Arrow';
7
7
  export { default as AtSign } from './AtSign';
8
8
  export { default as CtaArrow } from './CtaArrow';
9
9
  export { default as Post } from './Post';
10
+ export { default as Filter } from './Filter';
11
+ export { default as Undo } from './Undo';
@@ -218,7 +218,7 @@ it('renders link styled as button correctly', () => {
218
218
 
219
219
  .c0:disabled {
220
220
  cursor: not-allowed;
221
- opacity: 0.5;
221
+ opacity: 0.35;
222
222
  }
223
223
 
224
224
  @media (min-width: 740px) {
@@ -1,7 +1,9 @@
1
1
  import React from 'react';
2
2
  import Link from './Link';
3
3
  import buttonTypes from '../../../theme/crTheme/buttonTypes';
4
- import { External, Download, Favourite, Internal, Chevron, Arrow, AtSign } from '../Icons/index';
4
+ import {
5
+ External, Download, Favourite, Internal, Chevron, Arrow, AtSign
6
+ } from '../Icons/index';
5
7
  import { ExampleContainer } from '../../../demos/SharedStyles';
6
8
 
7
9
  export default function LinkExample() {
@@ -106,7 +108,7 @@ export default function LinkExample() {
106
108
  href="#anchor"
107
109
  target="blank"
108
110
  type="button"
109
- icon={<Internal colour="white" mobileColour="red"/>}
111
+ icon={<Internal colour="white" mobileColour="red" />}
110
112
  >
111
113
  Internal link, 'blue' with red icon on tablet and mobile
112
114
  </Link>