@financial-times/cp-content-pipeline-ui 6.8.1 → 6.9.1

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.
@@ -40,12 +40,13 @@ type LiveBlogWrapperTypes = {
40
40
  serialiser: any //TODO: keeps TS happy, but maybe not required?
41
41
  }
42
42
 
43
- type stateTypes = { postCount: number; tracker: any }
43
+ type LiveBlogWrapperState = { postCount?: number; tracker?: any }
44
44
 
45
- class BaseLiveBlogWrapper extends Component<LiveBlogWrapperTypes, stateTypes> {
46
- constructor(props: LiveBlogWrapperTypes) {
47
- super(props)
48
- }
45
+ class BaseLiveBlogWrapper extends Component<
46
+ LiveBlogWrapperTypes,
47
+ LiveBlogWrapperState
48
+ > {
49
+ state: LiveBlogWrapperState = {}
49
50
 
50
51
  componentDidUpdate() {
51
52
  if (this.props.posts && this.props.posts.length && !this.state.tracker) {
@@ -1,5 +1,18 @@
1
1
  /* Topper styles are in o-topper codebase */
2
2
  /* Flourish topper is not a distributable Origami topper, but only used via cp-pipeline-ui */
3
3
  .o-topper--flourish {
4
- padding: 0 10px;
4
+ // Do not use the grid to set top padding. Works only on Desktop
5
+ grid-template-rows: none;
6
+ .o-topper__content {
7
+ // Set top padding for all resolutions
8
+ padding-top: 20px;
9
+ }
10
+ .n-content-layout {
11
+ // set margin to match designs
12
+ margin-top: 24px;
13
+ margin-bottom: 24px;
14
+ }
15
+ .n-content-layout__container {
16
+ padding: initial;
17
+ }
5
18
  }
@@ -9,7 +9,7 @@ import Columnist from './Columnist'
9
9
  import LiveBlogIndicator from './LiveBlogIndicator'
10
10
  import { FollowButtonSlot } from './FollowButtonSlot'
11
11
  import Flourish from '../Flourish'
12
- import { Layout, LayoutContainer } from '../Layout'
12
+ import { Layout } from '../Layout'
13
13
  import classnames from 'classnames'
14
14
  import type { ArticleQuery } from '@financial-times/cp-content-pipeline-client'
15
15
  import PartnerContentHeader from '../PartnerContentHeader'
@@ -144,17 +144,19 @@ export default function Topper({
144
144
  }
145
145
  />
146
146
  {isLiveBlog && isFlourish ? (
147
- <Layout layoutWidth="full-grid">
148
- <LayoutContainer>
149
- <Flourish
147
+ <Layout
148
+ layoutWidth={
149
+ topper.layoutWidth === 'full-grid' ? 'full-grid' : 'in-line'
150
+ }
151
+ >
152
+ <Flourish
150
153
  id={topper.leadFlourish.id || ''}
151
154
  flourishType={topper.leadFlourish.type || ''}
152
155
  description={topper.leadFlourish.description || ''}
153
156
  fallbackImage={topper.leadFlourish.fallbackImage || ''}
154
157
  iFrame={true}
155
158
  inArticleBody={false}
156
- />
157
- </LayoutContainer>
159
+ />
158
160
  </Layout>
159
161
  ) : (
160
162
  ''