|
1 | | -import Teaser from '../../../sections/teasers/Teaser/Teaser' |
2 | | -import TextBlock from '../../../sections/TextBlock/TextBlock' |
3 | | -import FullWidthImage, { FullWidthImageData } from '../../topicPages/FullWidthImage' |
4 | | -import FullWidthVideo from '../../topicPages/FullWidthVideo' |
5 | | -import Figure, { FigureData } from '../../topicPages/Figure' |
6 | | -import PageQuote from '../../topicPages/PageQuote' |
7 | | -import PromoTileArray from '../../../sections/PromoTiles/PromoTileArray' |
8 | | -import Promotion from '../../topicPages/Promotion' |
9 | | -import NewsList from '../../topicPages/NewsList' |
10 | | -import StockValues from '../../topicPages/StockValues' |
11 | | -import CookieDeclaration from '../../topicPages/CookieDeclaration' |
12 | | -import TwitterEmbed from '../../topicPages/TwitterEmbed' |
| 1 | +import type { BackgroundContainerProps } from '@core/Backgrounds' |
| 2 | +import AccordionBlock from '@sections/AccordionBlock/AccordionBlock' |
| 3 | +import { AnchorLinkList } from '@sections/AnchorLinkList' |
| 4 | +import { CampaignBanner } from '@sections/CampaignBanner' |
| 5 | +import Grid from '@sections/Grid/Grid' |
| 6 | +import { HomePageBanner } from '@sections/HomePageBanner/HomePageBanner' |
13 | 7 | import IframeCarousel from '@sections/IframeCarousel/IframeCarousel' |
14 | | -import VideoPlayer from '../../shared/VideoPlayer' |
| 8 | +import ImageCarousel from '@sections/ImageCarousel/ImageCarousel' |
| 9 | +import ImageForText from '@sections/ImageForText/ImageForText' |
| 10 | +import PromotionBlock from '@sections/promotionBlock/PromotionBlock' |
| 11 | +import TableBlock, { type TableBlockProps } from '@sections/TableBlock/TableBlock' |
| 12 | +import TabsBlock, { type TabsBlockProps } from '@sections/TabsBlock/TabsBlock' |
| 13 | +import { getColorForTabsTheme } from '@sections/TabsBlock/tabThemes' |
| 14 | +import TextWithIconArray from '@sections/TextWithIconArray/TextWithIconArray' |
15 | 15 | import TextTeaser from '@sections/teasers/TextTeaser/TextTeaser' |
16 | | -import KeyNumbers from '../../../sections/KeyNumber/KeyNumber' |
| 16 | +import { getColorForTheme } from '@sections/teasers/TextTeaser/theme' |
| 17 | +import VideoPlayerCarousel from '@sections/VideoPlayerCarousel/VideoPlayerCarousel' |
| 18 | +import Form from '@templates/forms/Form' |
17 | 19 | import CardsList from '../../../sections/cards/CardsList/CardsList' |
18 | | -import { |
| 20 | +import IFrameBlock from '../../../sections/IFrameBlock/IFrameBlock' |
| 21 | +import KeyNumbers from '../../../sections/KeyNumber/KeyNumber' |
| 22 | +import PromoTileArray from '../../../sections/PromoTiles/PromoTileArray' |
| 23 | +import TextBlock from '../../../sections/TextBlock/TextBlock' |
| 24 | +import Teaser from '../../../sections/teasers/Teaser/Teaser' |
| 25 | +import { type ColorKeyTokens, colorKeyToUtilityMap } from '../../../styles/colorKeyToUtilityMap' |
| 26 | +import type { |
| 27 | + AccordionData, |
19 | 28 | AnchorLinkData, |
20 | | - TopicPageSchema, |
21 | | - MagazinePageSchema, |
22 | | - TeaserData, |
23 | | - TextBlockData, |
24 | | - FullWidthVideoData, |
25 | | - TextWithIconArrayData, |
| 29 | + AnchorLinkListData, |
26 | 30 | CallToActionData, |
27 | | - QuoteData, |
28 | | - AccordionData, |
29 | | - PromoTileArrayData, |
30 | | - IFrameData, |
31 | | - PromotionData, |
| 31 | + CampaignBannerData, |
| 32 | + CardsListData, |
| 33 | + CookieDeclarationData, |
| 34 | + DesignOptions, |
32 | 35 | FormData, |
33 | | - TableData, |
| 36 | + FullWidthVideoData, |
| 37 | + GridData, |
| 38 | + IFrameData, |
| 39 | + IframeCarouselData, |
| 40 | + ImageCarouselData, |
| 41 | + ImageForTextData, |
| 42 | + KeyNumbersData, |
| 43 | + MagazinePageSchema, |
34 | 44 | NewsListData, |
| 45 | + PromoTileArrayData, |
| 46 | + PromotionData, |
| 47 | + QuoteData, |
35 | 48 | StockValuesData, |
| 49 | + TableData, |
| 50 | + TeaserData, |
| 51 | + TextBlockData, |
| 52 | + TextTeaserData, |
| 53 | + TextWithIconArrayData, |
| 54 | + TopicPageSchema, |
36 | 55 | TwitterEmbedData, |
37 | | - CookieDeclarationData, |
38 | | - ImageCarouselData, |
39 | | - IframeCarouselData, |
40 | | - VideoPlayerData, |
41 | 56 | VideoPlayerCarouselData, |
42 | | - TextTeaserData, |
43 | | - KeyNumbersData, |
44 | | - CardsListData, |
45 | | - GridData, |
46 | | - CampaignBannerData, |
47 | | - DesignOptions, |
48 | | - AnchorLinkListData, |
49 | | - ImageForTextData, |
| 57 | + VideoPlayerData, |
50 | 58 | } from '../../../types/index' |
51 | | -import { getColorForTheme } from '@sections/teasers/TextTeaser/theme' |
52 | | -import Grid from '@sections/Grid/Grid' |
53 | | -import { CampaignBanner } from '@sections/CampaignBanner' |
54 | | -import { BackgroundContainerProps } from '@core/Backgrounds' |
55 | | -import VideoPlayerCarousel from '@sections/VideoPlayerCarousel/VideoPlayerCarousel' |
56 | | -import ImageCarousel from '@sections/ImageCarousel/ImageCarousel' |
57 | | -import { AnchorLinkList } from '@sections/AnchorLinkList' |
58 | | -import ImageForText from '@sections/ImageForText/ImageForText' |
59 | | -import TextWithIconArray from '@sections/TextWithIconArray/TextWithIconArray' |
60 | | -import AccordionBlock from '@sections/AccordionBlock/AccordionBlock' |
61 | | -import TabsBlock, { TabsBlockProps } from '@sections/TabsBlock/TabsBlock' |
62 | | -import { getColorForTabsTheme } from '@sections/TabsBlock/tabThemes' |
63 | | -import { ColorKeyTokens, colorKeyToUtilityMap } from '../../../styles/colorKeyToUtilityMap' |
64 | | -import Form from '@templates/forms/Form' |
65 | | -import IFrameBlock from '../../../sections/IFrameBlock/IFrameBlock' |
66 | | -import { HomePageBanner } from '@sections/HomePageBanner/HomePageBanner' |
67 | | -import TableBlock, { TableBlockProps } from '@sections/TableBlock/TableBlock' |
68 | | -import PromotionBlock from '@sections/promotionBlock/PromotionBlock' |
| 59 | +import VideoPlayer from '../../shared/VideoPlayer' |
| 60 | +import CookieDeclaration from '../../topicPages/CookieDeclaration' |
| 61 | +import Figure, { type FigureData } from '../../topicPages/Figure' |
| 62 | +import FullWidthImage, { type FullWidthImageData } from '../../topicPages/FullWidthImage' |
| 63 | +import FullWidthVideo from '../../topicPages/FullWidthVideo' |
| 64 | +import NewsList from '../../topicPages/NewsList' |
| 65 | +import PageQuote from '../../topicPages/PageQuote' |
| 66 | +import Promotion from '../../topicPages/Promotion' |
| 67 | +import StockValues from '../../topicPages/StockValues' |
| 68 | +import TwitterEmbed from '../../topicPages/TwitterEmbed' |
69 | 69 |
|
70 | 70 | type DefaultComponent = { |
71 | 71 | id?: string |
@@ -232,6 +232,7 @@ export const PageContent = ({ data, titleBackground }: PageContentProps) => { |
232 | 232 | : (data?.content?.[previousComponentIndex] as unknown as ComponentProps) |
233 | 233 |
|
234 | 234 | const topSpacingClassName = applyPaddingTopIfApplicable(c, previousComponentToCompare) |
| 235 | + //In general most sections should get pb-page-content or it needs to take care of this customly |
235 | 236 | const spacingClassName = `${topSpacingClassName} pb-page-content` |
236 | 237 | //@ts-ignore:so many types |
237 | 238 | switch (c.type) { |
@@ -359,7 +360,7 @@ export const PageContent = ({ data, titleBackground }: PageContentProps) => { |
359 | 360 | case 'imageForText': |
360 | 361 | return <ImageForText key={c.id} data={c as ImageForTextData} /> |
361 | 362 | case 'tabs': |
362 | | - return <TabsBlock key={c.id} {...(c as any)} className={spacingClassName} /> |
| 363 | + return <TabsBlock key={c.id} {...(c as any)} className={topSpacingClassName} /> |
363 | 364 | /* Remove from here and move to Homepage Template PageContent */ |
364 | 365 | case 'homepageBanner': |
365 | 366 | return <HomePageBanner key={c.id} {...(c as any)} /> |
|
0 commit comments