Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { HostedContentDisclaimer } from './HostedContentDisclaimer';
import { Section } from './Section';

export default {
component: HostedContentDisclaimer,
title: 'Components/HostedContentDisclaimer',
};

export const Default = () => {
return (
<Section
showSideBorders={false}
showTopBorder={false}
shouldCenter={false}
element="section"
>
<HostedContentDisclaimer />
</Section>
);
};

Default.storyName = 'default';
31 changes: 31 additions & 0 deletions dotcom-rendering/src/components/HostedContentDisclaimer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { css } from '@emotion/react';
import {
palette as sourcePalette,
space,
textSans12,
} from '@guardian/source/foundations';

const containerStyles = css`
border-top: 2px solid ${sourcePalette.neutral[46]};
margin-top: ${space[4]}px;
padding-top: ${space[2]}px;
`;

const textStyles = css`
${textSans12};
color: ${sourcePalette.neutral[46]};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to add a palette colour for this in paletteDeclarations to allow for dark mode support when we get to it. Not a blocker for this PR though

`;

export const HostedContentDisclaimer = () => {
return (
<div css={containerStyles}>
<p css={textStyles}>
This article was paid for, produced and controlled by the
advertiser rather than the publisher. It is subject to
regulation by the Advertising Standards Authority. This content
is produced by the advertiser with no involvement from Guardian
News and Media staff.
</p>
</div>
);
};
13 changes: 2 additions & 11 deletions dotcom-rendering/src/layouts/HostedArticleLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import {
from,
palette as sourcePalette,
space,
textSans12,
} from '@guardian/source/foundations';
import { ArticleBody } from '../components/ArticleBody';
import { ArticleContainer } from '../components/ArticleContainer';
import { ArticleHeadline } from '../components/ArticleHeadline';
import { CallToActionAtom } from '../components/CallToActionAtom';
import { Caption } from '../components/Caption';
import { HostedContentDisclaimer } from '../components/HostedContentDisclaimer';
import { HostedContentHeader } from '../components/HostedContentHeader';
import { Island } from '../components/Island';
import { MainMedia } from '../components/MainMedia';
Expand Down Expand Up @@ -317,17 +317,8 @@ export const HostedArticleLayout = (props: WebProps | AppProps) => {
frontendData.isRightToLeftLang
}
/>
<HostedContentDisclaimer />
</ArticleContainer>

<span
css={css`
${textSans12}
color: ${sourcePalette.neutral[46]};
padding-bottom: ${space[4]}px;
`}
>
{'Placeholder - disclaimer text'}
</span>
</div>

<div css={onwardContentStyles}>
Expand Down
Loading