@times-components/ts-components 1.24.0 → 1.26.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 (137) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/__mocks__/isomorphic-unfetch.d.ts +3 -0
  3. package/dist/__mocks__/isomorphic-unfetch.js +4 -0
  4. package/dist/components/article-flag/LiveArticleFlag.js +5 -5
  5. package/dist/components/article-flag/styles.d.ts +4 -3
  6. package/dist/components/article-flag/styles.js +30 -26
  7. package/dist/components/article-header/ArticleHeader.js +11 -2
  8. package/dist/components/common-styles.d.ts +13 -0
  9. package/dist/components/common-styles.js +54 -10
  10. package/dist/components/in-article-big-numbers/BigNumbers.js +4 -4
  11. package/dist/components/in-article-big-numbers/styles.d.ts +1 -13
  12. package/dist/components/in-article-big-numbers/styles.js +3 -52
  13. package/dist/components/in-article-timelines/Timelines.d.ts +4 -0
  14. package/dist/components/in-article-timelines/Timelines.js +70 -0
  15. package/dist/components/in-article-timelines/Timelines.stories.d.ts +1 -0
  16. package/dist/components/in-article-timelines/Timelines.stories.js +21 -0
  17. package/dist/components/in-article-timelines/__tests__/Timelines.test.d.ts +2 -0
  18. package/dist/components/in-article-timelines/__tests__/Timelines.test.js +256 -0
  19. package/dist/components/in-article-timelines/styles.d.ts +15 -0
  20. package/dist/components/in-article-timelines/styles.js +115 -0
  21. package/dist/components/opta/football/fixtures/OptaFootballFixtures.js +5 -4
  22. package/dist/components/opta/football/fixtures/__tests__/OptaFootballFixtures.test.d.ts +2 -0
  23. package/dist/components/opta/football/fixtures/__tests__/OptaFootballFixtures.test.js +41 -0
  24. package/dist/components/opta/football/match-stats/OptaFootballMatchStats.js +4 -3
  25. package/dist/components/opta/football/match-stats/__tests__/OptaFootballMatchStats.test.d.ts +2 -0
  26. package/dist/components/opta/football/match-stats/__tests__/OptaFootballMatchStats.test.js +40 -0
  27. package/dist/components/opta/football/standings/OptaFootballStandings.js +4 -3
  28. package/dist/components/opta/football/standings/__tests__/OptaFootballStandings.test.d.ts +2 -0
  29. package/dist/components/opta/football/standings/__tests__/OptaFootballStandings.test.js +39 -0
  30. package/dist/components/opta/football/summary/OptaFootballSummary.js +4 -3
  31. package/dist/components/opta/football/summary/__tests__/OptaFootballSummary.test.d.ts +2 -0
  32. package/dist/components/opta/football/summary/__tests__/OptaFootballSummary.test.js +40 -0
  33. package/dist/components/opta/rugby/fixtures/OptaRugbyFixtures.d.ts +8 -0
  34. package/dist/components/opta/rugby/fixtures/OptaRugbyFixtures.js +54 -0
  35. package/dist/components/opta/rugby/fixtures/OptaRugbyFixtures.stories.d.ts +1 -0
  36. package/dist/components/opta/rugby/fixtures/OptaRugbyFixtures.stories.js +26 -0
  37. package/dist/components/opta/rugby/fixtures/__tests__/OptaRugbyFixtures.test.d.ts +2 -0
  38. package/dist/components/opta/rugby/fixtures/__tests__/OptaRugbyFixtures.test.js +41 -0
  39. package/dist/components/opta/rugby/fixtures/styles.d.ts +2 -0
  40. package/dist/components/opta/rugby/fixtures/styles.js +255 -0
  41. package/dist/components/opta/rugby/match-stats/OptaRugbyMatchStats.d.ts +7 -0
  42. package/dist/components/opta/rugby/match-stats/OptaRugbyMatchStats.js +43 -0
  43. package/dist/components/opta/rugby/match-stats/OptaRugbyMatchStats.stories.d.ts +1 -0
  44. package/dist/components/opta/rugby/match-stats/OptaRugbyMatchStats.stories.js +26 -0
  45. package/dist/components/opta/rugby/match-stats/__tests__/OptaRugbyMatchStats.test.d.ts +2 -0
  46. package/dist/components/opta/rugby/match-stats/__tests__/OptaRugbyMatchStats.test.js +40 -0
  47. package/dist/components/opta/rugby/match-stats/styles.d.ts +1 -0
  48. package/dist/components/opta/rugby/match-stats/styles.js +153 -0
  49. package/dist/components/opta/rugby/shared-styles.d.ts +6 -0
  50. package/dist/components/opta/rugby/shared-styles.js +72 -0
  51. package/dist/components/opta/rugby/standings/OptaRugbyStandings.d.ts +8 -0
  52. package/dist/components/opta/rugby/standings/OptaRugbyStandings.js +36 -0
  53. package/dist/components/opta/rugby/standings/OptaRugbyStandings.stories.d.ts +1 -0
  54. package/dist/components/opta/rugby/standings/OptaRugbyStandings.stories.js +36 -0
  55. package/dist/components/opta/rugby/standings/__tests__/OptaRugbyStandings.test.d.ts +2 -0
  56. package/dist/components/opta/rugby/standings/__tests__/OptaRugbyStandings.test.js +39 -0
  57. package/dist/components/opta/rugby/standings/styles.d.ts +1 -0
  58. package/dist/components/opta/rugby/standings/styles.js +247 -0
  59. package/dist/components/opta/rugby/summary/OptaRugbySummary.d.ts +7 -0
  60. package/dist/components/opta/rugby/summary/OptaRugbySummary.js +44 -0
  61. package/dist/components/opta/rugby/summary/OptaRugbySummary.stories.d.ts +1 -0
  62. package/dist/components/opta/rugby/summary/OptaRugbySummary.stories.js +26 -0
  63. package/dist/components/opta/rugby/summary/__tests__/OptaRugbySummary.test.d.ts +2 -0
  64. package/dist/components/opta/rugby/summary/__tests__/OptaRugbySummary.test.js +40 -0
  65. package/dist/components/opta/rugby/summary/styles.d.ts +1 -0
  66. package/dist/components/opta/rugby/summary/styles.js +152 -0
  67. package/dist/components/opta/utils/__tests__/config.test.d.ts +1 -0
  68. package/dist/components/opta/utils/__tests__/config.test.js +24 -0
  69. package/dist/components/opta/utils/config.d.ts +1 -1
  70. package/dist/components/opta/utils/config.js +12 -3
  71. package/dist/helpers/fetch/FetchProvider.js +3 -3
  72. package/dist/helpers/fetch/__tests__/FetchProvider.test.d.ts +0 -1
  73. package/dist/helpers/fetch/__tests__/FetchProvider.test.js +17 -23
  74. package/dist/index.d.ts +1 -0
  75. package/dist/index.js +2 -1
  76. package/jest.config.js +4 -4
  77. package/package.json +6 -5
  78. package/rnw.js +1 -1
  79. package/src/__mocks__/isomorphic-unfetch.ts +3 -0
  80. package/src/components/article-flag/LiveArticleFlag.tsx +7 -6
  81. package/src/components/article-flag/__tests__/__snapshots__/ArticleFlag.test.tsx.snap +100 -100
  82. package/src/components/article-flag/__tests__/__snapshots__/LiveArticleFlag.test.tsx.snap +33 -33
  83. package/src/components/article-flag/styles.ts +32 -27
  84. package/src/components/article-header/ArticleHeader.tsx +10 -2
  85. package/src/components/article-header/__tests__/__snapshots__/ArticleHeader.test.tsx.snap +14 -11
  86. package/src/components/carousel/__tests__/__snapshots__/GalleryCarousel.test.tsx.snap +3 -3
  87. package/src/components/common-styles.ts +66 -7
  88. package/src/components/in-article-big-numbers/BigNumbers.tsx +11 -8
  89. package/src/components/in-article-big-numbers/__tests__/__snapshots__/BigNumbers.test.tsx.snap +67 -67
  90. package/src/components/in-article-big-numbers/styles.ts +2 -65
  91. package/src/components/in-article-info-card/__tests__/__snapshots__/InfoCard.test.tsx.snap +8 -8
  92. package/src/components/in-article-info-card-bulletpoints/__tests__/__snapshots__/InfoCardBulletPoints.test.tsx.snap +2 -2
  93. package/src/components/in-article-puff/__tests__/__snapshots__/InArticlePuff.test.tsx.snap +10 -10
  94. package/src/components/in-article-timelines/Timelines.stories.tsx +33 -0
  95. package/src/components/in-article-timelines/Timelines.tsx +160 -0
  96. package/src/components/in-article-timelines/__tests__/Timelines.test.tsx +309 -0
  97. package/src/components/in-article-timelines/__tests__/__snapshots__/Timelines.test.tsx.snap +727 -0
  98. package/src/components/in-article-timelines/styles.ts +127 -0
  99. package/src/components/opta/football/fixtures/OptaFootballFixtures.tsx +5 -3
  100. package/src/components/opta/football/fixtures/__tests__/OptaFootballFixtures.test.tsx +53 -0
  101. package/src/components/opta/football/fixtures/__tests__/__snapshots__/OptaFootballFixtures.test.tsx.snap +34 -0
  102. package/src/components/opta/football/match-stats/OptaFootballMatchStats.tsx +4 -2
  103. package/src/components/opta/football/match-stats/__tests__/OptaFootballMatchStats.test.tsx +52 -0
  104. package/src/components/opta/football/match-stats/__tests__/__snapshots__/OptaFootballMatchStats.test.tsx.snap +34 -0
  105. package/src/components/opta/football/standings/OptaFootballStandings.tsx +4 -2
  106. package/src/components/opta/football/standings/__tests__/OptaFootballStandings.test.tsx +51 -0
  107. package/src/components/opta/football/standings/__tests__/__snapshots__/OptaFootballStandings.test.tsx.snap +34 -0
  108. package/src/components/opta/football/summary/OptaFootballSummary.tsx +4 -2
  109. package/src/components/opta/football/summary/__tests__/OptaFootballSummary.test.tsx +52 -0
  110. package/src/components/opta/football/summary/__tests__/__snapshots__/OptaFootballSummary.test.tsx.snap +34 -0
  111. package/src/components/opta/rugby/fixtures/OptaRugbyFixtures.stories.tsx +44 -0
  112. package/src/components/opta/rugby/fixtures/OptaRugbyFixtures.tsx +86 -0
  113. package/src/components/opta/rugby/fixtures/__tests__/OptaRugbyFixtures.test.tsx +53 -0
  114. package/src/components/opta/rugby/fixtures/__tests__/__snapshots__/OptaRugbyFixtures.test.tsx.snap +34 -0
  115. package/src/components/opta/rugby/fixtures/styles.ts +257 -0
  116. package/src/components/opta/rugby/match-stats/OptaRugbyMatchStats.stories.tsx +34 -0
  117. package/src/components/opta/rugby/match-stats/OptaRugbyMatchStats.tsx +71 -0
  118. package/src/components/opta/rugby/match-stats/__tests__/OptaRugbyMatchStats.test.tsx +52 -0
  119. package/src/components/opta/rugby/match-stats/__tests__/__snapshots__/OptaRugbyMatchStats.test.tsx.snap +34 -0
  120. package/src/components/opta/rugby/match-stats/styles.ts +154 -0
  121. package/src/components/opta/rugby/shared-styles.ts +75 -0
  122. package/src/components/opta/rugby/standings/OptaRugbyStandings.stories.tsx +49 -0
  123. package/src/components/opta/rugby/standings/OptaRugbyStandings.tsx +66 -0
  124. package/src/components/opta/rugby/standings/__tests__/OptaRugbyStandings.test.tsx +51 -0
  125. package/src/components/opta/rugby/standings/__tests__/__snapshots__/OptaRugbyStandings.test.tsx.snap +34 -0
  126. package/src/components/opta/rugby/standings/styles.ts +248 -0
  127. package/src/components/opta/rugby/summary/OptaRugbySummary.stories.tsx +34 -0
  128. package/src/components/opta/rugby/summary/OptaRugbySummary.tsx +71 -0
  129. package/src/components/opta/rugby/summary/__tests__/OptaRugbySummary.test.tsx +52 -0
  130. package/src/components/opta/rugby/summary/__tests__/__snapshots__/OptaRugbySummary.test.tsx.snap +34 -0
  131. package/src/components/opta/rugby/summary/styles.ts +153 -0
  132. package/src/components/opta/utils/__tests__/config.test.tsx +38 -0
  133. package/src/components/opta/utils/config.ts +13 -3
  134. package/src/helpers/fetch/FetchProvider.tsx +2 -2
  135. package/src/helpers/fetch/__tests__/FetchProvider.test.tsx +21 -31
  136. package/src/helpers/fetch/__tests__/__snapshots__/FetchProvider.test.tsx.snap +10 -2
  137. package/src/index.ts +1 -0
@@ -3,18 +3,18 @@
3
3
  exports[`BigNumbers click show all 1`] = `
4
4
  <DocumentFragment>
5
5
  <div
6
- class="sc-bdVaJa juVWHz"
6
+ class="sc-dnqmqq hHfasZ"
7
7
  >
8
8
  <div
9
- class="sc-bwzfXH gozLqp"
9
+ class="sc-iwsKbI fMDvHO"
10
10
  >
11
11
  <div
12
- class="sc-gZMcBi hyVIiP"
12
+ class="sc-bwzfXH gzPkze"
13
13
  >
14
14
  President Race
15
15
  </div>
16
16
  <div
17
- class="sc-htpNat ljnJGi"
17
+ class="sc-gzVnrw cqivXS"
18
18
  >
19
19
  The stats behind the two candidates
20
20
  </div>
@@ -22,74 +22,74 @@ exports[`BigNumbers click show all 1`] = `
22
22
  class="sc-EHOje kSjPZf"
23
23
  >
24
24
  <ul
25
- class="sc-bZQynM bPxSyH"
25
+ class="sc-ifAKCX LUyZI"
26
26
  >
27
27
  <li
28
- class="sc-gzVnrw dAAiph"
28
+ class="sc-gqjmRU ejoKUJ"
29
29
  >
30
30
  <div
31
- class="sc-htoDjs bxDFJf"
31
+ class="sc-VigVT lbzqVL"
32
32
  >
33
33
  $497.8m
34
34
  </div>
35
35
  <div
36
- class="sc-dnqmqq dDGXyB"
36
+ class="sc-bxivhb bPVvqJ"
37
37
  >
38
38
  Money raised by Hillary Clinton
39
39
  </div>
40
40
  </li>
41
41
  <li
42
- class="sc-gzVnrw dAAiph"
42
+ class="sc-gqjmRU ejoKUJ"
43
43
  >
44
44
  <div
45
- class="sc-htoDjs bxDFJf"
45
+ class="sc-VigVT lbzqVL"
46
46
  >
47
47
  $247.8m
48
48
  </div>
49
49
  <div
50
- class="sc-dnqmqq dDGXyB"
50
+ class="sc-bxivhb bPVvqJ"
51
51
  >
52
52
  Money raised by Donald Trump
53
53
  </div>
54
54
  </li>
55
55
  <li
56
- class="sc-gzVnrw dAAiph"
56
+ class="sc-gqjmRU ejoKUJ"
57
57
  >
58
58
  <div
59
- class="sc-htoDjs bxDFJf"
59
+ class="sc-VigVT lbzqVL"
60
60
  >
61
61
  71.6m
62
62
  </div>
63
63
  <div
64
- class="sc-dnqmqq dDGXyB"
64
+ class="sc-bxivhb bPVvqJ"
65
65
  >
66
66
  The number of people who turned in to the final president debate
67
67
  </div>
68
68
  </li>
69
69
  <li
70
- class="sc-gzVnrw dAAiph"
70
+ class="sc-gqjmRU ejoKUJ"
71
71
  >
72
72
  <div
73
- class="sc-htoDjs bxDFJf"
73
+ class="sc-VigVT lbzqVL"
74
74
  >
75
75
  2-7
76
76
  </div>
77
77
  <div
78
- class="sc-dnqmqq dDGXyB"
78
+ class="sc-bxivhb bPVvqJ"
79
79
  >
80
80
  Clinton’s odds of winning the US election (provided by Paddy Power)
81
81
  </div>
82
82
  </li>
83
83
  <li
84
- class="sc-gzVnrw dAAiph"
84
+ class="sc-gqjmRU ejoKUJ"
85
85
  >
86
86
  <div
87
- class="sc-htoDjs bxDFJf"
87
+ class="sc-VigVT lbzqVL"
88
88
  >
89
89
  3-1
90
90
  </div>
91
91
  <div
92
- class="sc-dnqmqq dDGXyB"
92
+ class="sc-bxivhb bPVvqJ"
93
93
  >
94
94
  Trump’s odds of winning the US election (provided by Paddy Power)
95
95
  </div>
@@ -98,10 +98,10 @@ exports[`BigNumbers click show all 1`] = `
98
98
  </div>
99
99
  </div>
100
100
  <div
101
- class="sc-bxivhb dqNwGy"
101
+ class="sc-bZQynM iNwlGF"
102
102
  >
103
103
  <button
104
- class="sc-ifAKCX kpjxlo"
104
+ class="sc-htoDjs sc-gZMcBi fiRWob"
105
105
  >
106
106
  Collapse
107
107
  </button>
@@ -113,7 +113,7 @@ exports[`BigNumbers click show all 1`] = `
113
113
  exports[`BigNumbers should render the initial loading state correctly 1`] = `
114
114
  <DocumentFragment>
115
115
  <div
116
- class="sc-iwsKbI PRvgD"
116
+ class="sc-bdVaJa dwiMsX"
117
117
  >
118
118
  <div>
119
119
  Placeholder
@@ -125,18 +125,18 @@ exports[`BigNumbers should render the initial loading state correctly 1`] = `
125
125
  exports[`BigNumbers should render the standard component 1`] = `
126
126
  <DocumentFragment>
127
127
  <div
128
- class="sc-bdVaJa juVWHz"
128
+ class="sc-dnqmqq hHfasZ"
129
129
  >
130
130
  <div
131
- class="sc-bwzfXH gozLqp"
131
+ class="sc-iwsKbI fMDvHO"
132
132
  >
133
133
  <div
134
- class="sc-gZMcBi hyVIiP"
134
+ class="sc-bwzfXH gzPkze"
135
135
  >
136
136
  President Race
137
137
  </div>
138
138
  <div
139
- class="sc-htpNat ljnJGi"
139
+ class="sc-gzVnrw cqivXS"
140
140
  >
141
141
  The stats behind the two candidates
142
142
  </div>
@@ -144,74 +144,74 @@ exports[`BigNumbers should render the standard component 1`] = `
144
144
  class="sc-EHOje kSjPZf"
145
145
  >
146
146
  <ul
147
- class="sc-bZQynM bPxSyH"
147
+ class="sc-ifAKCX LUyZI"
148
148
  >
149
149
  <li
150
- class="sc-gzVnrw dAAiph"
150
+ class="sc-gqjmRU ejoKUJ"
151
151
  >
152
152
  <div
153
- class="sc-htoDjs bxDFJf"
153
+ class="sc-VigVT lbzqVL"
154
154
  >
155
155
  $497.8m
156
156
  </div>
157
157
  <div
158
- class="sc-dnqmqq dDGXyB"
158
+ class="sc-bxivhb bPVvqJ"
159
159
  >
160
160
  Money raised by Hillary Clinton
161
161
  </div>
162
162
  </li>
163
163
  <li
164
- class="sc-gzVnrw dAAiph"
164
+ class="sc-gqjmRU ejoKUJ"
165
165
  >
166
166
  <div
167
- class="sc-htoDjs bxDFJf"
167
+ class="sc-VigVT lbzqVL"
168
168
  >
169
169
  $247.8m
170
170
  </div>
171
171
  <div
172
- class="sc-dnqmqq dDGXyB"
172
+ class="sc-bxivhb bPVvqJ"
173
173
  >
174
174
  Money raised by Donald Trump
175
175
  </div>
176
176
  </li>
177
177
  <li
178
- class="sc-gzVnrw dAAiph"
178
+ class="sc-gqjmRU ejoKUJ"
179
179
  >
180
180
  <div
181
- class="sc-htoDjs bxDFJf"
181
+ class="sc-VigVT lbzqVL"
182
182
  >
183
183
  71.6m
184
184
  </div>
185
185
  <div
186
- class="sc-dnqmqq dDGXyB"
186
+ class="sc-bxivhb bPVvqJ"
187
187
  >
188
188
  The number of people who turned in to the final president debate
189
189
  </div>
190
190
  </li>
191
191
  <li
192
- class="sc-gzVnrw dAAiph"
192
+ class="sc-gqjmRU ejoKUJ"
193
193
  >
194
194
  <div
195
- class="sc-htoDjs bxDFJf"
195
+ class="sc-VigVT lbzqVL"
196
196
  >
197
197
  2-7
198
198
  </div>
199
199
  <div
200
- class="sc-dnqmqq dDGXyB"
200
+ class="sc-bxivhb bPVvqJ"
201
201
  >
202
202
  Clinton’s odds of winning the US election (provided by Paddy Power)
203
203
  </div>
204
204
  </li>
205
205
  <li
206
- class="sc-gzVnrw dAAiph"
206
+ class="sc-gqjmRU ejoKUJ"
207
207
  >
208
208
  <div
209
- class="sc-htoDjs bxDFJf"
209
+ class="sc-VigVT lbzqVL"
210
210
  >
211
211
  3-1
212
212
  </div>
213
213
  <div
214
- class="sc-dnqmqq dDGXyB"
214
+ class="sc-bxivhb bPVvqJ"
215
215
  >
216
216
  Trump’s odds of winning the US election (provided by Paddy Power)
217
217
  </div>
@@ -220,10 +220,10 @@ exports[`BigNumbers should render the standard component 1`] = `
220
220
  </div>
221
221
  </div>
222
222
  <div
223
- class="sc-bxivhb dqNwGy"
223
+ class="sc-bZQynM iNwlGF"
224
224
  >
225
225
  <button
226
- class="sc-ifAKCX kpjxlo"
226
+ class="sc-htoDjs sc-gZMcBi fiRWob"
227
227
  >
228
228
  Show all
229
229
  </button>
@@ -235,18 +235,18 @@ exports[`BigNumbers should render the standard component 1`] = `
235
235
  exports[`BigNumbers should render the wide component 1`] = `
236
236
  <DocumentFragment>
237
237
  <div
238
- class="sc-bdVaJa rtVDO"
238
+ class="sc-dnqmqq gFoWtC"
239
239
  >
240
240
  <div
241
- class="sc-bwzfXH gozLqp"
241
+ class="sc-iwsKbI fMDvHO"
242
242
  >
243
243
  <div
244
- class="sc-gZMcBi hyVIiP"
244
+ class="sc-bwzfXH gzPkze"
245
245
  >
246
246
  President Race
247
247
  </div>
248
248
  <div
249
- class="sc-htpNat ljnJGi"
249
+ class="sc-gzVnrw cqivXS"
250
250
  >
251
251
  The stats behind the two candidates
252
252
  </div>
@@ -254,74 +254,74 @@ exports[`BigNumbers should render the wide component 1`] = `
254
254
  class="sc-EHOje kSjPZf"
255
255
  >
256
256
  <ul
257
- class="sc-bZQynM bPxSyH"
257
+ class="sc-ifAKCX LUyZI"
258
258
  >
259
259
  <li
260
- class="sc-gzVnrw gTHlzh"
260
+ class="sc-gqjmRU dvjqsJ"
261
261
  >
262
262
  <div
263
- class="sc-htoDjs bxDFJf"
263
+ class="sc-VigVT lbzqVL"
264
264
  >
265
265
  $497.8m
266
266
  </div>
267
267
  <div
268
- class="sc-dnqmqq dDGXyB"
268
+ class="sc-bxivhb bPVvqJ"
269
269
  >
270
270
  Money raised by Hillary Clinton
271
271
  </div>
272
272
  </li>
273
273
  <li
274
- class="sc-gzVnrw gTHlzh"
274
+ class="sc-gqjmRU dvjqsJ"
275
275
  >
276
276
  <div
277
- class="sc-htoDjs bxDFJf"
277
+ class="sc-VigVT lbzqVL"
278
278
  >
279
279
  $247.8m
280
280
  </div>
281
281
  <div
282
- class="sc-dnqmqq dDGXyB"
282
+ class="sc-bxivhb bPVvqJ"
283
283
  >
284
284
  Money raised by Donald Trump
285
285
  </div>
286
286
  </li>
287
287
  <li
288
- class="sc-gzVnrw gTHlzh"
288
+ class="sc-gqjmRU dvjqsJ"
289
289
  >
290
290
  <div
291
- class="sc-htoDjs bxDFJf"
291
+ class="sc-VigVT lbzqVL"
292
292
  >
293
293
  71.6m
294
294
  </div>
295
295
  <div
296
- class="sc-dnqmqq dDGXyB"
296
+ class="sc-bxivhb bPVvqJ"
297
297
  >
298
298
  The number of people who turned in to the final president debate
299
299
  </div>
300
300
  </li>
301
301
  <li
302
- class="sc-gzVnrw gTHlzh"
302
+ class="sc-gqjmRU dvjqsJ"
303
303
  >
304
304
  <div
305
- class="sc-htoDjs bxDFJf"
305
+ class="sc-VigVT lbzqVL"
306
306
  >
307
307
  2-7
308
308
  </div>
309
309
  <div
310
- class="sc-dnqmqq dDGXyB"
310
+ class="sc-bxivhb bPVvqJ"
311
311
  >
312
312
  Clinton’s odds of winning the US election (provided by Paddy Power)
313
313
  </div>
314
314
  </li>
315
315
  <li
316
- class="sc-gzVnrw gTHlzh"
316
+ class="sc-gqjmRU dvjqsJ"
317
317
  >
318
318
  <div
319
- class="sc-htoDjs bxDFJf"
319
+ class="sc-VigVT lbzqVL"
320
320
  >
321
321
  3-1
322
322
  </div>
323
323
  <div
324
- class="sc-dnqmqq dDGXyB"
324
+ class="sc-bxivhb bPVvqJ"
325
325
  >
326
326
  Trump’s odds of winning the US election (provided by Paddy Power)
327
327
  </div>
@@ -330,10 +330,10 @@ exports[`BigNumbers should render the wide component 1`] = `
330
330
  </div>
331
331
  </div>
332
332
  <div
333
- class="sc-bxivhb dqNwGy"
333
+ class="sc-bZQynM iNwlGF"
334
334
  >
335
335
  <button
336
- class="sc-ifAKCX kpjxlo"
336
+ class="sc-htoDjs sc-gZMcBi fiRWob"
337
337
  >
338
338
  Show all
339
339
  </button>
@@ -1,5 +1,6 @@
1
1
  import styled from 'styled-components';
2
2
  import { breakpoints, colours, fonts } from '@times-components/styleguide';
3
+ import { ShowAllButton } from '../common-styles';
3
4
 
4
5
  export const Container = styled.div<{
5
6
  sectionColour: string;
@@ -31,67 +32,10 @@ export const ContentContainer = styled.div`
31
32
  padding: 0 16px;
32
33
  `;
33
34
 
34
- export const Headline = styled.div`
35
- font-family: ${fonts.headline};
36
- font-size: 24px;
37
- line-height: 24px;
38
- color: ${colours.functional.brandColour};
39
- margin: 0 0 6px;
40
- @media (min-width: ${breakpoints.medium}px) {
41
- font-size: 32px;
42
- line-height: 32px;
43
- }
44
- `;
45
-
46
- export const ShowAllContainer = styled.div<{
47
- showAll: boolean;
48
- displayShowAll: boolean;
49
- }>`
50
- display: flex;
51
- border-top: 1px solid ${colours.functional.keyline};
52
- padding: 5px;
53
- justify-content: center;
54
- display: ${({ displayShowAll: displayShowAll }) =>
55
- displayShowAll ? 'flex' : 'none'};
56
- `;
57
-
58
- export const ShowAllButton = styled.button`
35
+ export const StyledShowAllButton = styled(ShowAllButton)`
59
36
  font-size: 12px;
60
- font-family: ${fonts.supporting};
61
- font-weight: 500;
62
- line-height: 20px;
63
- border: 1px solid ${colours.functional.primary};
64
- background: transparent;
65
37
  margin: 15px 0;
66
38
  padding: 10px 12px 5px;
67
- cursor: pointer;
68
- &:active {
69
- border: 1px solid ${colours.functional.action};
70
- color: ${colours.functional.action};
71
- }
72
- `;
73
-
74
- export const ListContainer = styled.div<{
75
- showAll: boolean;
76
- maxHeight: number;
77
- displayShowAll: boolean;
78
- }>`
79
- display: flex;
80
- flex-direction: column;
81
- justify-content: space-between;
82
- overflow: hidden;
83
- max-height: ${({ showAll, maxHeight, displayShowAll }) =>
84
- !showAll && displayShowAll ? maxHeight + 'px' : 'none'};
85
- `;
86
-
87
- export const List = styled.ul`
88
- display: flex;
89
- flex-wrap: wrap;
90
- margin: 0 -2px -1px -15px;
91
- list-style: none;
92
- padding: 0;
93
- @media (min-width: ${breakpoints.medium}px) {
94
- }
95
39
  `;
96
40
 
97
41
  export const ListItem = styled.li<{
@@ -129,10 +73,3 @@ export const NumberContainer = styled.div<{ sectionColour: string }>`
129
73
  line-height: 40px;
130
74
  }
131
75
  `;
132
-
133
- export const Copy = styled.div`
134
- color: ${colours.functional.secondary};
135
- font-family: ${fonts.body};
136
- font-size: 16px;
137
- line-height: 24px;
138
- `;
@@ -37,7 +37,7 @@ exports[`InfoCard renders 1`] = `
37
37
  tabindex="0"
38
38
  >
39
39
  <div
40
- class="sc-jKJlTe daGHwh"
40
+ class="sc-hSdWYo dVKMAw"
41
41
  >
42
42
  <img
43
43
  class="sc-kGXeez iiZPJL"
@@ -198,7 +198,7 @@ exports[`InfoCard renders 1`] = `
198
198
  class="sc-chPdSV cxUg"
199
199
  >
200
200
  <div
201
- class="sc-dxgOiQ kyeaEO"
201
+ class="sc-dxgOiQ gNDmzV"
202
202
  >
203
203
  Best places to stay
204
204
  </div>
@@ -307,7 +307,7 @@ exports[`InfoCard renders no image 1`] = `
307
307
  tabindex="0"
308
308
  >
309
309
  <div
310
- class="sc-jKJlTe daGHwh"
310
+ class="sc-hSdWYo dVKMAw"
311
311
  >
312
312
  <img
313
313
  class="sc-kGXeez iiZPJL"
@@ -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 kyeaEO"
471
+ class="sc-dxgOiQ gNDmzV"
472
472
  >
473
473
  Best places to stay
474
474
  </div>
@@ -590,7 +590,7 @@ exports[`InfoCard should render the standard component 1`] = `
590
590
  tabindex="0"
591
591
  >
592
592
  <div
593
- class="sc-jKJlTe daGHwh"
593
+ class="sc-hSdWYo dVKMAw"
594
594
  >
595
595
  <img
596
596
  class="sc-kGXeez iiZPJL"
@@ -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 kyeaEO"
749
+ class="sc-dxgOiQ gNDmzV"
750
750
  >
751
751
  Best places to stay
752
752
  </div>
@@ -853,7 +853,7 @@ exports[`InfoCard should render the wide component 1`] = `
853
853
  tabindex="0"
854
854
  >
855
855
  <div
856
- class="sc-jKJlTe daGHwh"
856
+ class="sc-hSdWYo dVKMAw"
857
857
  >
858
858
  <img
859
859
  class="sc-kGXeez iiZPJL"
@@ -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 kyeaEO"
1012
+ class="sc-dxgOiQ gNDmzV"
1013
1013
  >
1014
1014
  Best places to stay
1015
1015
  </div>
@@ -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 cqnspX"
12
+ class="sc-dnqmqq cjsHty"
13
13
  >
14
14
  Venezuelan Politics
15
15
  </div>
@@ -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 cqnspX"
91
+ class="sc-dnqmqq cjsHty"
92
92
  >
93
93
  Venezuelan Politics
94
94
  </div>
@@ -3,10 +3,10 @@
3
3
  exports[`InArticlePuff should render optional fields correctly 1`] = `
4
4
  <DocumentFragment>
5
5
  <div
6
- class="sc-bZQynM eLgtba"
6
+ class="sc-gqjmRU gHUBfw"
7
7
  >
8
8
  <div
9
- class="sc-gzVnrw giIBiZ"
9
+ class="sc-VigVT gIbSHY"
10
10
  >
11
11
  <a
12
12
  href="https://www.thetimes.co.uk"
@@ -21,11 +21,11 @@ exports[`InArticlePuff should render optional fields correctly 1`] = `
21
21
  </a>
22
22
  </div>
23
23
  <div
24
- class="sc-htoDjs etvidI"
24
+ class="sc-jTzLTM cAAdkC"
25
25
  >
26
26
  <div>
27
27
  <div
28
- class="sc-dnqmqq frenqu"
28
+ class="sc-fjdhpX bCDTJX"
29
29
  >
30
30
  interactive
31
31
  </div>
@@ -33,13 +33,13 @@ exports[`InArticlePuff should render optional fields correctly 1`] = `
33
33
  href="https://www.thetimes.co.uk"
34
34
  >
35
35
  <h4
36
- class="sc-iwsKbI imXvZS"
36
+ class="sc-jzJRlG bluMUd"
37
37
  >
38
38
  Where can I get a Covid vaccine in England?
39
39
  </h4>
40
40
  </a>
41
41
  <div
42
- class="sc-gZMcBi gBQBMy"
42
+ class="sc-cSHVUG itcrty"
43
43
  >
44
44
  Enter your postcode to find your nearest centre
45
45
  </div>
@@ -69,14 +69,14 @@ exports[`InArticlePuff should render optional fields correctly 1`] = `
69
69
  exports[`InArticlePuff should render required fields correctly 1`] = `
70
70
  <DocumentFragment>
71
71
  <div
72
- class="sc-bZQynM eLgtba"
72
+ class="sc-gqjmRU gHUBfw"
73
73
  >
74
74
  <div
75
- class="sc-htoDjs hXHeXp"
75
+ class="sc-jTzLTM jFRmZO"
76
76
  >
77
77
  <div>
78
78
  <div
79
- class="sc-dnqmqq bTDdnU"
79
+ class="sc-fjdhpX gKXrO"
80
80
  >
81
81
  interactive
82
82
  </div>
@@ -84,7 +84,7 @@ exports[`InArticlePuff should render required fields correctly 1`] = `
84
84
  href="https://www.thetimes.co.uk"
85
85
  >
86
86
  <h4
87
- class="sc-iwsKbI kBnSBc"
87
+ class="sc-jzJRlG crzPVo"
88
88
  >
89
89
  Where can I get a Covid vaccine in England?
90
90
  </h4>
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+ import { storiesOf } from '@storybook/react';
3
+ import { ArticleHarness } from '../../fixtures/article-harness/ArticleHarness';
4
+ import { FetchProvider } from '../../helpers/fetch/FetchProvider';
5
+ import { Timelines } from './Timelines';
6
+ import { TrackingContextProvider } from '../../helpers/tracking/TrackingContextProvider';
7
+ import analyticsStream from '../../fixtures/analytics-actions/analytics-actions';
8
+
9
+ storiesOf('Typescript Component/In Article/Timelines', module)
10
+ .addDecorator((storyFn: () => React.ReactNode) => (
11
+ <TrackingContextProvider
12
+ context={{
13
+ component: 'ArticleSkeleton',
14
+ attrs: {
15
+ article_name: 'articleHeadline',
16
+ section_details: 'section'
17
+ }
18
+ }}
19
+ analyticsStream={analyticsStream}
20
+ >
21
+ <ArticleHarness>{storyFn()}</ArticleHarness>
22
+ </TrackingContextProvider>
23
+ ))
24
+ .add('Timelines with Bullet Point', () => (
25
+ <FetchProvider url="https://gobble.timesdev.tools/deck/api/deck-post-action/45060">
26
+ <Timelines sectionColour="#008347" />
27
+ </FetchProvider>
28
+ ))
29
+ .add('Timelines with Circular Image', () => (
30
+ <FetchProvider url="https://gobble.timesdev.tools/deck/api/deck-post-action/45061">
31
+ <Timelines sectionColour="#008347" />
32
+ </FetchProvider>
33
+ ));