@times-components/ts-components 1.64.2 → 1.65.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 (97) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/components/article-flag/styles.js +4 -2
  3. package/dist/components/article-header/ArticleHeader.stories.js +11 -10
  4. package/dist/components/article-header/styles.js +2 -2
  5. package/dist/components/carousel/GalleryCarousel.stories.js +28 -12
  6. package/dist/components/common-styles.js +1 -1
  7. package/dist/components/in-article-big-numbers/BigNumbers.stories.js +25 -9
  8. package/dist/components/in-article-big-numbers/styles.js +1 -1
  9. package/dist/components/in-article-info-card/InfoCard.stories.js +35 -11
  10. package/dist/components/in-article-info-card-bulletpoints/InfoCardBulletPoints.stories.js +5 -6
  11. package/dist/components/in-article-link/styles.js +1 -1
  12. package/dist/components/in-article-puff/InArticlePuff.stories.js +25 -9
  13. package/dist/components/in-article-puff/styles.js +2 -3
  14. package/dist/components/in-article-related-articles/InArticleRelatedArticles.stories.js +11 -12
  15. package/dist/components/in-article-timelines/Timelines.stories.js +15 -7
  16. package/dist/components/in-article-timelines/styles.js +1 -1
  17. package/dist/components/inline-dialog/styles.js +1 -1
  18. package/dist/components/inline-message/styles.js +2 -2
  19. package/dist/components/newsletter-puff/newsletter-puff-button/styles.js +4 -4
  20. package/dist/components/olympics/medal-table/OlympicsMedalTable.stories.js +4 -5
  21. package/dist/components/olympics/schedule/OlympicsSchedule.stories.js +4 -5
  22. package/dist/components/opta/football/fixtures/styles.js +5 -4
  23. package/dist/components/opta/football/match-stats/styles.js +1 -1
  24. package/dist/components/opta/football/standings/styles.js +2 -2
  25. package/dist/components/opta/football/summary/styles.js +1 -1
  26. package/dist/components/opta/rugby/fixtures/styles.js +4 -3
  27. package/dist/components/opta/rugby/match-stats/styles.js +1 -1
  28. package/dist/components/opta/rugby/standings/styles.js +4 -3
  29. package/dist/components/opta/rugby/summary/styles.js +1 -1
  30. package/dist/components/recommended-articles/RecommendedArticles.stories.js +36 -9
  31. package/dist/components/save-star/SaveStar.stories.js +4 -5
  32. package/dist/components/save-star/styles.js +1 -1
  33. package/dist/components/updated-timestamp/styles.js +1 -1
  34. package/dist/helpers/text-crop/fonts.js +13 -5
  35. package/package.json +16 -16
  36. package/rnw.js +1 -1
  37. package/src/components/article-flag/__tests__/__snapshots__/LiveArticleFlag.test.tsx.snap +3 -3
  38. package/src/components/article-flag/styles.ts +3 -1
  39. package/src/components/article-header/ArticleHeader.stories.tsx +17 -16
  40. package/src/components/article-header/styles.ts +2 -2
  41. package/src/components/carousel/GalleryCarousel.stories.tsx +44 -19
  42. package/src/components/carousel/__tests__/__snapshots__/GalleryCarousel.test.tsx.snap +3 -3
  43. package/src/components/common-styles.ts +1 -1
  44. package/src/components/in-article-big-numbers/BigNumbers.stories.tsx +38 -13
  45. package/src/components/in-article-big-numbers/__tests__/__snapshots__/BigNumbers.test.tsx.snap +6 -6
  46. package/src/components/in-article-big-numbers/styles.ts +1 -1
  47. package/src/components/in-article-info-card/InfoCard.stories.tsx +54 -16
  48. package/src/components/in-article-info-card/__tests__/__snapshots__/InfoCard.test.tsx.snap +4 -4
  49. package/src/components/in-article-info-card-bulletpoints/InfoCardBulletPoints.stories.tsx +10 -10
  50. package/src/components/in-article-info-card-bulletpoints/__tests__/__snapshots__/InfoCardBulletPoints.test.tsx.snap +4 -4
  51. package/src/components/in-article-link/styles.ts +1 -1
  52. package/src/components/in-article-puff/InArticlePuff.stories.tsx +42 -17
  53. package/src/components/in-article-puff/__tests__/__snapshots__/InArticlePuff.test.tsx.snap +4 -4
  54. package/src/components/in-article-puff/styles.ts +1 -2
  55. package/src/components/in-article-related-articles/InArticleRelatedArticles.stories.tsx +26 -26
  56. package/src/components/in-article-related-articles/__tests__/__snapshots__/RelatedArticle.test.tsx.snap +2 -2
  57. package/src/components/in-article-related-articles/__tests__/__snapshots__/SingleRelatedArticle.test.tsx.snap +2 -2
  58. package/src/components/in-article-timelines/Timelines.stories.tsx +22 -10
  59. package/src/components/in-article-timelines/__tests__/__snapshots__/Timelines.test.tsx.snap +27 -27
  60. package/src/components/in-article-timelines/styles.ts +1 -1
  61. package/src/components/inline-dialog/__tests__/__snapshots__/InlineDialog.test.tsx.snap +1 -1
  62. package/src/components/inline-dialog/styles.ts +1 -1
  63. package/src/components/inline-message/__tests__/__snapshots__/InlineMessage.test.tsx.snap +2 -2
  64. package/src/components/inline-message/styles.ts +2 -2
  65. package/src/components/latest-from-section/__tests__/__snapshots__/LatestFromSection.test.tsx.snap +9 -9
  66. package/src/components/newsletter-puff/__tests__/__snapshots__/InlineNewsletterPuff.test.tsx.snap +3 -3
  67. package/src/components/newsletter-puff/newsletter-puff-button/styles.ts +3 -3
  68. package/src/components/newsletter-puff/preview-newsletter-puff/__tests__/__snapshots__/PreviewNewsletterPuff.test.tsx.snap +1 -1
  69. package/src/components/olympics/__tests__/__snapshots__/OlympicsMedalTable.test.tsx.snap +20 -20
  70. package/src/components/olympics/__tests__/__snapshots__/OlympicsSchedule.test.tsx.snap +28 -28
  71. package/src/components/olympics/medal-table/OlympicsMedalTable.stories.tsx +8 -11
  72. package/src/components/olympics/schedule/OlympicsSchedule.stories.tsx +8 -10
  73. package/src/components/opta/football/fixtures/__tests__/__snapshots__/OptaFootballFixtures.test.tsx.snap +2 -2
  74. package/src/components/opta/football/fixtures/styles.ts +4 -3
  75. package/src/components/opta/football/match-stats/__tests__/__snapshots__/OptaFootballMatchStats.test.tsx.snap +2 -2
  76. package/src/components/opta/football/match-stats/styles.ts +1 -1
  77. package/src/components/opta/football/standings/__tests__/__snapshots__/OptaFootballStandings.test.tsx.snap +2 -2
  78. package/src/components/opta/football/standings/styles.ts +2 -2
  79. package/src/components/opta/football/summary/__tests__/__snapshots__/OptaFootballSummary.test.tsx.snap +2 -2
  80. package/src/components/opta/football/summary/styles.ts +1 -1
  81. package/src/components/opta/rugby/fixtures/__tests__/__snapshots__/OptaRugbyFixtures.test.tsx.snap +2 -2
  82. package/src/components/opta/rugby/fixtures/styles.ts +3 -2
  83. package/src/components/opta/rugby/match-stats/__tests__/__snapshots__/OptaRugbyMatchStats.test.tsx.snap +2 -2
  84. package/src/components/opta/rugby/match-stats/styles.ts +1 -1
  85. package/src/components/opta/rugby/standings/__tests__/__snapshots__/OptaRugbyStandings.test.tsx.snap +2 -2
  86. package/src/components/opta/rugby/standings/styles.ts +3 -2
  87. package/src/components/opta/rugby/summary/__tests__/__snapshots__/OptaRugbySummary.test.tsx.snap +2 -2
  88. package/src/components/opta/rugby/summary/styles.ts +1 -1
  89. package/src/components/recommended-articles/RecommendedArticles.stories.tsx +46 -15
  90. package/src/components/related-article-slice/__tests__/__snapshots__/RelatedArticleSlice.test.tsx.snap +6 -6
  91. package/src/components/save-star/SaveStar.stories.tsx +16 -16
  92. package/src/components/save-star/__tests__/__snapshots__/SaveStar.test.tsx.snap +3 -3
  93. package/src/components/save-star/styles.ts +1 -1
  94. package/src/components/updated-timestamp/__tests__/__snapshots__/UpdatedTimestamp.test.tsx.snap +1 -1
  95. package/src/components/updated-timestamp/styles.ts +1 -1
  96. package/src/helpers/text-crop/__tests__/__snapshots__/TextCrop.test.tsx.snap +4 -4
  97. package/src/helpers/text-crop/fonts.ts +13 -4
@@ -17,7 +17,7 @@ exports[`LiveArticleFlag should render the base live article flag 1`] = `
17
17
  />
18
18
  </div>
19
19
  <span
20
- class="sc-bwzfXH hBgZUv"
20
+ class="sc-bwzfXH crsvMm"
21
21
  >
22
22
  BASE
23
23
  </span>
@@ -44,7 +44,7 @@ exports[`LiveArticleFlag should render the breaking article flag 1`] = `
44
44
  />
45
45
  </div>
46
46
  <span
47
- class="sc-bwzfXH hBgZUv"
47
+ class="sc-bwzfXH crsvMm"
48
48
  >
49
49
  BREAKING
50
50
  </span>
@@ -71,7 +71,7 @@ exports[`LiveArticleFlag should render the live article flag 1`] = `
71
71
  />
72
72
  </div>
73
73
  <span
74
- class="sc-bwzfXH hBgZUv"
74
+ class="sc-bwzfXH crsvMm"
75
75
  >
76
76
  LIVE
77
77
  </span>
@@ -17,7 +17,9 @@ export const LiveArticleFlagText = styled.span`
17
17
  color: #ffffff;
18
18
  font-weight: 500;
19
19
  font-size: 12px;
20
- letter-spacing: 0.1em;
20
+ letter-spacing: 0.05em;
21
+ display: flex;
22
+ align-items: center;
21
23
  `;
22
24
 
23
25
  const flashing = keyframes`
@@ -29,29 +29,30 @@ const getAttributes = () => {
29
29
  };
30
30
 
31
31
  storiesOf('Typescript Component/Article Header', module)
32
- .addDecorator((storyFn: () => React.ReactNode) => (
33
- <ArticleHarness>{storyFn()}</ArticleHarness>
34
- ))
35
32
  .add('Article Header with headline', () => {
36
33
  const props = getAttributes();
37
34
  return (
38
- <ArticleHeader
39
- updated={props.updated}
40
- // date={props.date}
41
- // time={props.time}
42
- breaking={props.breaking}
43
- headline={encodeURIComponent(props.headline)}
44
- />
35
+ <ArticleHarness>
36
+ <ArticleHeader
37
+ updated={props.updated}
38
+ // date={props.date}
39
+ // time={props.time}
40
+ breaking={props.breaking}
41
+ headline={encodeURIComponent(props.headline)}
42
+ />
43
+ </ArticleHarness>
45
44
  );
46
45
  })
47
46
  .add('Article Header without headline', () => {
48
47
  const props = getAttributes();
49
48
  return (
50
- <ArticleHeader
51
- updated={props.updated}
52
- // date={props.date}
53
- // time={props.time}
54
- breaking={props.breaking}
55
- />
49
+ <ArticleHarness>
50
+ <ArticleHeader
51
+ updated={props.updated}
52
+ // date={props.date}
53
+ // time={props.time}
54
+ breaking={props.breaking}
55
+ />
56
+ </ArticleHarness>
56
57
  );
57
58
  });
@@ -34,14 +34,14 @@ export const TimeSincePublishingContainer = styled.div`
34
34
  export const TimeSincePublishing = styled.div`
35
35
  color: ${colours.functional.brandColour};
36
36
  font-family: ${fonts.supporting};
37
- font-size: 14px;
37
+ font-size: 13px;
38
38
  line-height: 18px;
39
39
  `;
40
40
 
41
41
  const updatedStyle = css`
42
42
  color: ${colours.functional.secondary};
43
43
  font-family: ${fonts.supporting};
44
- font-size: 14px;
44
+ font-size: 13px;
45
45
  line-height: 18px;
46
46
  `;
47
47
 
@@ -10,7 +10,7 @@ import previewData from '../../fixtures/preview-data/gallery-carousel';
10
10
  import analyticsStream from '../../fixtures/analytics-actions/analytics-actions';
11
11
 
12
12
  storiesOf('Typescript Component/Gallery Carousel', module)
13
- .addDecorator((storyFn: () => React.ReactNode) => (
13
+ .add('Wide', () => (
14
14
  <TrackingContextProvider
15
15
  analyticsStream={analyticsStream}
16
16
  context={{
@@ -21,27 +21,52 @@ storiesOf('Typescript Component/Gallery Carousel', module)
21
21
  }
22
22
  }}
23
23
  >
24
- <ArticleHarness>{storyFn()}</ArticleHarness>
24
+ <ArticleHarness>
25
+ <FetchProvider previewData={previewData[43486]}>
26
+ <div style={{ margin: '20px 0px' }}>
27
+ <GalleryCarousel sectionColour="#13354E" />
28
+ </div>
29
+ </FetchProvider>
30
+ </ArticleHarness>
25
31
  </TrackingContextProvider>
26
32
  ))
27
- .add('Wide', () => (
28
- <FetchProvider previewData={previewData[43486]}>
29
- <div style={{ margin: '20px 0px' }}>
30
- <GalleryCarousel sectionColour="#13354E" />
31
- </div>
32
- </FetchProvider>
33
- ))
34
33
  .add('Regular', () => (
35
- <FetchProvider previewData={previewData[43484]}>
36
- <div style={{ margin: '20px 0px' }}>
37
- <GalleryCarousel sectionColour="#13354E" />
38
- </div>
39
- </FetchProvider>
34
+ <TrackingContextProvider
35
+ analyticsStream={analyticsStream}
36
+ context={{
37
+ component: 'ArticleSkeleton',
38
+ attrs: {
39
+ article_name: 'Headline',
40
+ section_details: 'Section'
41
+ }
42
+ }}
43
+ >
44
+ <ArticleHarness>
45
+ <FetchProvider previewData={previewData[43484]}>
46
+ <div style={{ margin: '20px 0px' }}>
47
+ <GalleryCarousel sectionColour="#13354E" />
48
+ </div>
49
+ </FetchProvider>
50
+ </ArticleHarness>
51
+ </TrackingContextProvider>
40
52
  ))
41
53
  .add('Small', () => (
42
- <FetchProvider previewData={previewData[43434]}>
43
- <div style={{ margin: '20px 0px' }}>
44
- <GalleryCarousel sectionColour="#13354E" />
45
- </div>
46
- </FetchProvider>
54
+ <TrackingContextProvider
55
+ analyticsStream={analyticsStream}
56
+ context={{
57
+ component: 'ArticleSkeleton',
58
+ attrs: {
59
+ article_name: 'Headline',
60
+ section_details: 'Section'
61
+ }
62
+ }}
63
+ >
64
+ <ArticleHarness>
65
+ <FetchProvider previewData={previewData[43434]}>
66
+ <div style={{ margin: '20px 0px' }}>
67
+ <GalleryCarousel sectionColour="#13354E" />
68
+ </div>
69
+ </FetchProvider>
70
+ </ArticleHarness>
71
+ </TrackingContextProvider>
47
72
  ));
@@ -78,7 +78,7 @@ exports[`GalleryCarousel should render the component 1`] = `
78
78
  class="sc-kAzzGY eTzlhe"
79
79
  >
80
80
  <div
81
- class="sc-ckVGcZ pKgO"
81
+ class="sc-ckVGcZ jscMvM"
82
82
  >
83
83
  Label 1
84
84
  </div>
@@ -159,7 +159,7 @@ exports[`GalleryCarousel should render the component 1`] = `
159
159
  </div>
160
160
  <div>
161
161
  <div
162
- class="sc-gqjmRU cwbOMy"
162
+ class="sc-gqjmRU elBRrc"
163
163
  >
164
164
  Michael Clarke
165
165
  </div>
@@ -222,7 +222,7 @@ exports[`GalleryCarousel should render the component 1`] = `
222
222
  style="padding-left: 16px; padding-right: 16px;"
223
223
  >
224
224
  <div
225
- class="sc-gqjmRU cwbOMy"
225
+ class="sc-gqjmRU elBRrc"
226
226
  >
227
227
  Michael Clarke
228
228
  </div>
@@ -22,7 +22,7 @@ export const Label = styled.div<{ sectionColour: string }>`
22
22
  text-transform: uppercase;
23
23
  color: ${({ sectionColour }) => `${sectionColour}`};
24
24
  padding-bottom: 5px;
25
- letter-spacing: 1px;
25
+ letter-spacing: 0.5px;
26
26
  `;
27
27
 
28
28
  export const HiddenDiv = styled.div`
@@ -7,7 +7,7 @@ import { TrackingContextProvider } from '../../helpers/tracking/TrackingContextP
7
7
  import analyticsStream from '../../fixtures/analytics-actions/analytics-actions';
8
8
 
9
9
  storiesOf('Typescript Component/In Article/Big Numbers', module)
10
- .addDecorator((storyFn: () => React.ReactNode) => (
10
+ .add('Standard without a headline', () => (
11
11
  <TrackingContextProvider
12
12
  context={{
13
13
  component: 'ArticleSkeleton',
@@ -18,21 +18,46 @@ storiesOf('Typescript Component/In Article/Big Numbers', module)
18
18
  }}
19
19
  analyticsStream={analyticsStream}
20
20
  >
21
- <ArticleHarness>{storyFn()}</ArticleHarness>
21
+ <ArticleHarness>
22
+ <FetchProvider url="https://gobble.timesdev.tools/deck/api/deck-post-action/44335">
23
+ <BigNumbers sectionColour="#636C17" />
24
+ </FetchProvider>
25
+ </ArticleHarness>
22
26
  </TrackingContextProvider>
23
27
  ))
24
- .add('Standard without a headline', () => (
25
- <FetchProvider url="https://gobble.timesdev.tools/deck/api/deck-post-action/44335">
26
- <BigNumbers sectionColour="#636C17" />
27
- </FetchProvider>
28
- ))
29
28
  .add('Standard with One Card', () => (
30
- <FetchProvider url="https://gobble.timesdev.tools/deck/api/deck-post-action/44336">
31
- <BigNumbers sectionColour="#636C17" />
32
- </FetchProvider>
29
+ <TrackingContextProvider
30
+ context={{
31
+ component: 'ArticleSkeleton',
32
+ attrs: {
33
+ article_name: 'articleHeadline',
34
+ section_details: 'section'
35
+ }
36
+ }}
37
+ analyticsStream={analyticsStream}
38
+ >
39
+ <ArticleHarness>
40
+ <FetchProvider url="https://gobble.timesdev.tools/deck/api/deck-post-action/44336">
41
+ <BigNumbers sectionColour="#636C17" />
42
+ </FetchProvider>
43
+ </ArticleHarness>
44
+ </TrackingContextProvider>
33
45
  ))
34
46
  .add('Wide with a headline', () => (
35
- <FetchProvider url="https://gobble.timesdev.tools/deck/api/deck-post-action/44334">
36
- <BigNumbers sectionColour="#636C17" />
37
- </FetchProvider>
47
+ <TrackingContextProvider
48
+ context={{
49
+ component: 'ArticleSkeleton',
50
+ attrs: {
51
+ article_name: 'articleHeadline',
52
+ section_details: 'section'
53
+ }
54
+ }}
55
+ analyticsStream={analyticsStream}
56
+ >
57
+ <ArticleHarness>
58
+ <FetchProvider url="https://gobble.timesdev.tools/deck/api/deck-post-action/44334">
59
+ <BigNumbers sectionColour="#636C17" />
60
+ </FetchProvider>
61
+ </ArticleHarness>
62
+ </TrackingContextProvider>
38
63
  ));
@@ -9,7 +9,7 @@ exports[`BigNumbers click show all 1`] = `
9
9
  class="sc-iwsKbI fMDvHO"
10
10
  >
11
11
  <div
12
- class="sc-bwzfXH gzPkze"
12
+ class="sc-bwzfXH gePxOS"
13
13
  >
14
14
  President Race
15
15
  </div>
@@ -101,7 +101,7 @@ exports[`BigNumbers click show all 1`] = `
101
101
  class="sc-bZQynM iNwlGF"
102
102
  >
103
103
  <button
104
- class="sc-htoDjs sc-gZMcBi fiRWob"
104
+ class="sc-htoDjs sc-gZMcBi gJkCHi"
105
105
  >
106
106
  Collapse
107
107
  </button>
@@ -131,7 +131,7 @@ exports[`BigNumbers should render the standard component 1`] = `
131
131
  class="sc-iwsKbI fMDvHO"
132
132
  >
133
133
  <div
134
- class="sc-bwzfXH gzPkze"
134
+ class="sc-bwzfXH gePxOS"
135
135
  >
136
136
  President Race
137
137
  </div>
@@ -223,7 +223,7 @@ exports[`BigNumbers should render the standard component 1`] = `
223
223
  class="sc-bZQynM iNwlGF"
224
224
  >
225
225
  <button
226
- class="sc-htoDjs sc-gZMcBi fiRWob"
226
+ class="sc-htoDjs sc-gZMcBi gJkCHi"
227
227
  >
228
228
  Show all
229
229
  </button>
@@ -241,7 +241,7 @@ exports[`BigNumbers should render the wide component 1`] = `
241
241
  class="sc-iwsKbI fMDvHO"
242
242
  >
243
243
  <div
244
- class="sc-bwzfXH gzPkze"
244
+ class="sc-bwzfXH gePxOS"
245
245
  >
246
246
  President Race
247
247
  </div>
@@ -333,7 +333,7 @@ exports[`BigNumbers should render the wide component 1`] = `
333
333
  class="sc-bZQynM iNwlGF"
334
334
  >
335
335
  <button
336
- class="sc-htoDjs sc-gZMcBi fiRWob"
336
+ class="sc-htoDjs sc-gZMcBi gJkCHi"
337
337
  >
338
338
  Show all
339
339
  </button>
@@ -35,7 +35,7 @@ export const ContentContainer = styled.div`
35
35
  export const StyledShowAllButton = styled(ShowAllButton)`
36
36
  font-size: 12px;
37
37
  margin: 15px 0;
38
- padding: 10px 12px 5px;
38
+ padding: 8px 12px 7px;
39
39
  `;
40
40
 
41
41
  export const ListItem = styled.li<{
@@ -10,7 +10,7 @@ import previewData from '../../fixtures/preview-data/in-article-info-card';
10
10
  import analyticsStream from '../../fixtures/analytics-actions/analytics-actions';
11
11
 
12
12
  storiesOf('Typescript Component/In Article/Info Card', module)
13
- .addDecorator((storyFn: () => React.ReactNode) => (
13
+ .add('Standard with Copy & Subtitle', () => (
14
14
  <TrackingContextProvider
15
15
  analyticsStream={analyticsStream}
16
16
  context={{
@@ -21,26 +21,64 @@ storiesOf('Typescript Component/In Article/Info Card', module)
21
21
  }
22
22
  }}
23
23
  >
24
- <ArticleHarness>{storyFn()}</ArticleHarness>
24
+ <ArticleHarness>
25
+ <FetchProvider previewData={previewData[43606]}>
26
+ <InfoCard sectionColour="#636C17" />
27
+ </FetchProvider>
28
+ </ArticleHarness>
25
29
  </TrackingContextProvider>
26
30
  ))
27
- .add('Standard with Copy & Subtitle', () => (
28
- <FetchProvider previewData={previewData[43606]}>
29
- <InfoCard sectionColour="#636C17" />
30
- </FetchProvider>
31
- ))
32
31
  .add('Standard with Image', () => (
33
- <FetchProvider previewData={previewData[43961]}>
34
- <InfoCard sectionColour="#636C17" />
35
- </FetchProvider>
32
+ <TrackingContextProvider
33
+ analyticsStream={analyticsStream}
34
+ context={{
35
+ component: 'ArticleSkeleton',
36
+ attrs: {
37
+ article_name: 'Headline',
38
+ section_details: 'Section'
39
+ }
40
+ }}
41
+ >
42
+ <ArticleHarness>
43
+ <FetchProvider previewData={previewData[43961]}>
44
+ <InfoCard sectionColour="#636C17" />
45
+ </FetchProvider>
46
+ </ArticleHarness>
47
+ </TrackingContextProvider>
36
48
  ))
37
49
  .add('Wide with Copy', () => (
38
- <FetchProvider previewData={previewData[43603]}>
39
- <InfoCard sectionColour="#636C17" />
40
- </FetchProvider>
50
+ <TrackingContextProvider
51
+ analyticsStream={analyticsStream}
52
+ context={{
53
+ component: 'ArticleSkeleton',
54
+ attrs: {
55
+ article_name: 'Headline',
56
+ section_details: 'Section'
57
+ }
58
+ }}
59
+ >
60
+ <ArticleHarness>
61
+ <FetchProvider previewData={previewData[43603]}>
62
+ <InfoCard sectionColour="#636C17" />
63
+ </FetchProvider>
64
+ </ArticleHarness>
65
+ </TrackingContextProvider>
41
66
  ))
42
67
  .add('Wide with Image', () => (
43
- <FetchProvider previewData={previewData[43614]}>
44
- <InfoCard sectionColour="#636C17" />
45
- </FetchProvider>
68
+ <TrackingContextProvider
69
+ analyticsStream={analyticsStream}
70
+ context={{
71
+ component: 'ArticleSkeleton',
72
+ attrs: {
73
+ article_name: 'Headline',
74
+ section_details: 'Section'
75
+ }
76
+ }}
77
+ >
78
+ <ArticleHarness>
79
+ <FetchProvider previewData={previewData[43614]}>
80
+ <InfoCard sectionColour="#636C17" />
81
+ </FetchProvider>
82
+ </ArticleHarness>
83
+ </TrackingContextProvider>
46
84
  ));
@@ -198,7 +198,7 @@ exports[`InfoCard renders 1`] = `
198
198
  class="sc-chPdSV cxUg"
199
199
  >
200
200
  <div
201
- class="sc-dxgOiQ gNDmzV"
201
+ class="sc-dxgOiQ khSkYd"
202
202
  >
203
203
  Best places to stay
204
204
  </div>
@@ -468,7 +468,7 @@ exports[`InfoCard renders no image 1`] = `
468
468
  class="sc-chPdSV cxUg"
469
469
  >
470
470
  <div
471
- class="sc-dxgOiQ gNDmzV"
471
+ class="sc-dxgOiQ khSkYd"
472
472
  >
473
473
  Best places to stay
474
474
  </div>
@@ -746,7 +746,7 @@ exports[`InfoCard should render the standard component 1`] = `
746
746
  class="sc-chPdSV cxUg"
747
747
  >
748
748
  <div
749
- class="sc-dxgOiQ gNDmzV"
749
+ class="sc-dxgOiQ khSkYd"
750
750
  >
751
751
  Best places to stay
752
752
  </div>
@@ -1009,7 +1009,7 @@ exports[`InfoCard should render the wide component 1`] = `
1009
1009
  class="sc-chPdSV cxUg"
1010
1010
  >
1011
1011
  <div
1012
- class="sc-dxgOiQ gNDmzV"
1012
+ class="sc-dxgOiQ khSkYd"
1013
1013
  >
1014
1014
  Best places to stay
1015
1015
  </div>
@@ -6,8 +6,9 @@ import { InfoCardBulletPoints } from './InfoCardBulletPoints';
6
6
  import { TrackingContextProvider } from '../../helpers/tracking/TrackingContextProvider';
7
7
  import analyticsStream from '../../fixtures/analytics-actions/analytics-actions';
8
8
 
9
- storiesOf('Typescript Component/In Article/Info Card', module)
10
- .addDecorator((storyFn: () => React.ReactNode) => (
9
+ storiesOf('Typescript Component/In Article/Info Card', module).add(
10
+ 'Bullet Points',
11
+ () => (
11
12
  <TrackingContextProvider
12
13
  context={{
13
14
  component: 'ArticleSkeleton',
@@ -18,12 +19,11 @@ storiesOf('Typescript Component/In Article/Info Card', module)
18
19
  }}
19
20
  analyticsStream={analyticsStream}
20
21
  >
21
- <ArticleHarness>{storyFn()}</ArticleHarness>
22
+ <ArticleHarness>
23
+ <FetchProvider url="https://gobble.timesdev.tools/deck/api/deck-post-action/43978">
24
+ <InfoCardBulletPoints sectionColour="#636C17" />
25
+ </FetchProvider>
26
+ </ArticleHarness>
22
27
  </TrackingContextProvider>
23
- ))
24
-
25
- .add('Bullet Points', () => (
26
- <FetchProvider url="https://gobble.timesdev.tools/deck/api/deck-post-action/43978">
27
- <InfoCardBulletPoints sectionColour="#636C17" />
28
- </FetchProvider>
29
- ));
28
+ )
29
+ );
@@ -9,7 +9,7 @@ exports[`InfoCardBulletPoints should render the component 1`] = `
9
9
  class="sc-bwzfXH blmhpN"
10
10
  >
11
11
  <div
12
- class="sc-dnqmqq cjsHty"
12
+ class="sc-dnqmqq gzKSHu"
13
13
  >
14
14
  Venezuelan Politics
15
15
  </div>
@@ -56,7 +56,7 @@ exports[`InfoCardBulletPoints should render the component 1`] = `
56
56
  class="sc-bxivhb hAzEyl"
57
57
  >
58
58
  <button
59
- class="sc-ifAKCX kpjxlo"
59
+ class="sc-ifAKCX QXRPc"
60
60
  >
61
61
  Read more
62
62
  </button>
@@ -88,7 +88,7 @@ exports[`InfoCardBulletPoints tracking click read more 1`] = `
88
88
  class="sc-bwzfXH blmhpN"
89
89
  >
90
90
  <div
91
- class="sc-dnqmqq cjsHty"
91
+ class="sc-dnqmqq gzKSHu"
92
92
  >
93
93
  Venezuelan Politics
94
94
  </div>
@@ -135,7 +135,7 @@ exports[`InfoCardBulletPoints tracking click read more 1`] = `
135
135
  class="sc-bxivhb hpabOq"
136
136
  >
137
137
  <button
138
- class="sc-ifAKCX kpjxlo"
138
+ class="sc-ifAKCX QXRPc"
139
139
  >
140
140
  Collapse
141
141
  </button>
@@ -19,5 +19,5 @@ export const LinkText = styled.div`
19
19
  margin-top: 1px;
20
20
  margin-right: 12px;
21
21
  font-family: ${fonts.supporting};
22
- font-size: 16px;
22
+ font-size: 15px;
23
23
  `;
@@ -10,7 +10,7 @@ import previewData from '../../fixtures/preview-data/in-article-puff';
10
10
  import analyticsStream from '../../fixtures/analytics-actions/analytics-actions';
11
11
 
12
12
  storiesOf('Typescript Component/In Article/In Article Puff', module)
13
- .addDecorator((storyFn: () => React.ReactNode) => (
13
+ .add('Image', () => (
14
14
  <TrackingContextProvider
15
15
  context={{
16
16
  component: 'ArticleSkeleton',
@@ -21,25 +21,50 @@ storiesOf('Typescript Component/In Article/In Article Puff', module)
21
21
  }}
22
22
  analyticsStream={analyticsStream}
23
23
  >
24
- <ArticleHarness>{storyFn()}</ArticleHarness>
24
+ <ArticleHarness>
25
+ <FetchProvider previewData={previewData[41548]}>
26
+ <InArticlePuff sectionColour="#13354e" />
27
+ </FetchProvider>
28
+ </ArticleHarness>
25
29
  </TrackingContextProvider>
26
30
  ))
27
- .add('Image', () => (
28
- <FetchProvider previewData={previewData[41548]}>
29
- <InArticlePuff sectionColour="#13354e" />
30
- </FetchProvider>
31
- ))
32
31
  .add('Image 3:2', () => (
33
- <FetchProvider previewData={previewData[41548]}>
34
- <InArticlePuff
35
- sectionColour="#13354e"
36
- forceImageAspectRatio="3:2"
37
- isLiveOrBreaking="breaking"
38
- />
39
- </FetchProvider>
32
+ <TrackingContextProvider
33
+ context={{
34
+ component: 'ArticleSkeleton',
35
+ attrs: {
36
+ article_name: 'articleHeadline',
37
+ section_details: 'section'
38
+ }
39
+ }}
40
+ analyticsStream={analyticsStream}
41
+ >
42
+ <ArticleHarness>
43
+ <FetchProvider previewData={previewData[41548]}>
44
+ <InArticlePuff
45
+ sectionColour="#13354e"
46
+ forceImageAspectRatio="3:2"
47
+ isLiveOrBreaking="breaking"
48
+ />
49
+ </FetchProvider>
50
+ </ArticleHarness>
51
+ </TrackingContextProvider>
40
52
  ))
41
53
  .add('No Image', () => (
42
- <FetchProvider previewData={previewData[41547]}>
43
- <InArticlePuff sectionColour="#184e13" isLiveOrBreaking="live" />
44
- </FetchProvider>
54
+ <TrackingContextProvider
55
+ context={{
56
+ component: 'ArticleSkeleton',
57
+ attrs: {
58
+ article_name: 'articleHeadline',
59
+ section_details: 'section'
60
+ }
61
+ }}
62
+ analyticsStream={analyticsStream}
63
+ >
64
+ <ArticleHarness>
65
+ <FetchProvider previewData={previewData[41547]}>
66
+ <InArticlePuff sectionColour="#184e13" isLiveOrBreaking="live" />
67
+ </FetchProvider>
68
+ </ArticleHarness>
69
+ </TrackingContextProvider>
45
70
  ));
@@ -25,7 +25,7 @@ exports[`InArticlePuff should render optional fields correctly 1`] = `
25
25
  >
26
26
  <div>
27
27
  <div
28
- class="sc-fjdhpX bCDTJX"
28
+ class="sc-fjdhpX ixGEuo"
29
29
  >
30
30
  interactive
31
31
  </div>
@@ -49,7 +49,7 @@ exports[`InArticlePuff should render optional fields correctly 1`] = `
49
49
  href="https://www.thetimes.co.uk"
50
50
  >
51
51
  <div
52
- class="sc-htpNat irNLqr"
52
+ class="sc-htpNat fyASJZ"
53
53
  >
54
54
  Read the full article
55
55
  </div>
@@ -76,7 +76,7 @@ exports[`InArticlePuff should render required fields correctly 1`] = `
76
76
  >
77
77
  <div>
78
78
  <div
79
- class="sc-fjdhpX gKXrO"
79
+ class="sc-fjdhpX cWEcCh"
80
80
  >
81
81
  interactive
82
82
  </div>
@@ -95,7 +95,7 @@ exports[`InArticlePuff should render required fields correctly 1`] = `
95
95
  href="https://www.thetimes.co.uk"
96
96
  >
97
97
  <div
98
- class="sc-htpNat irNLqr"
98
+ class="sc-htpNat fyASJZ"
99
99
  >
100
100
  Read more
101
101
  </div>