Skip to content

Commit 8ea2760

Browse files
authored
Merge pull request #15467 from guardian/ih/hosted-disclaimer
Add hosted content disclaimer component
2 parents a56e269 + b56c549 commit 8ea2760

3 files changed

Lines changed: 55 additions & 11 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { HostedContentDisclaimer } from './HostedContentDisclaimer';
2+
import { Section } from './Section';
3+
4+
export default {
5+
component: HostedContentDisclaimer,
6+
title: 'Components/HostedContentDisclaimer',
7+
};
8+
9+
export const Default = () => {
10+
return (
11+
<Section
12+
showSideBorders={false}
13+
showTopBorder={false}
14+
shouldCenter={false}
15+
element="section"
16+
>
17+
<HostedContentDisclaimer />
18+
</Section>
19+
);
20+
};
21+
22+
Default.storyName = 'default';
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { css } from '@emotion/react';
2+
import {
3+
palette as sourcePalette,
4+
space,
5+
textSans12,
6+
} from '@guardian/source/foundations';
7+
8+
const containerStyles = css`
9+
border-top: 2px solid ${sourcePalette.neutral[46]};
10+
margin-top: ${space[4]}px;
11+
padding-top: ${space[2]}px;
12+
`;
13+
14+
const textStyles = css`
15+
${textSans12};
16+
color: ${sourcePalette.neutral[46]};
17+
`;
18+
19+
export const HostedContentDisclaimer = () => {
20+
return (
21+
<div css={containerStyles}>
22+
<p css={textStyles}>
23+
This article was paid for, produced and controlled by the
24+
advertiser rather than the publisher. It is subject to
25+
regulation by the Advertising Standards Authority. This content
26+
is produced by the advertiser with no involvement from Guardian
27+
News and Media staff.
28+
</p>
29+
</div>
30+
);
31+
};

dotcom-rendering/src/layouts/HostedArticleLayout.tsx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import {
44
from,
55
palette as sourcePalette,
66
space,
7-
textSans12,
87
} from '@guardian/source/foundations';
98
import { ArticleBody } from '../components/ArticleBody';
109
import { ArticleContainer } from '../components/ArticleContainer';
1110
import { ArticleHeadline } from '../components/ArticleHeadline';
1211
import { CallToActionAtom } from '../components/CallToActionAtom';
1312
import { Caption } from '../components/Caption';
13+
import { HostedContentDisclaimer } from '../components/HostedContentDisclaimer';
1414
import { HostedContentHeader } from '../components/HostedContentHeader';
1515
import { Island } from '../components/Island';
1616
import { MainMedia } from '../components/MainMedia';
@@ -317,17 +317,8 @@ export const HostedArticleLayout = (props: WebProps | AppProps) => {
317317
frontendData.isRightToLeftLang
318318
}
319319
/>
320+
<HostedContentDisclaimer />
320321
</ArticleContainer>
321-
322-
<span
323-
css={css`
324-
${textSans12}
325-
color: ${sourcePalette.neutral[46]};
326-
padding-bottom: ${space[4]}px;
327-
`}
328-
>
329-
{'Placeholder - disclaimer text'}
330-
</span>
331322
</div>
332323

333324
<div css={onwardContentStyles}>

0 commit comments

Comments
 (0)