Skip to content

Commit 393648c

Browse files
committed
fix top border and container spacing
1 parent c1577a8 commit 393648c

File tree

3 files changed

+25
-18
lines changed

3 files changed

+25
-18
lines changed

dotcom-rendering/src/components/HostedContentDisclaimer.stories.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,15 @@ export default {
88

99
export const Default = () => {
1010
return (
11-
<Section showSideBorders={false} showTopBorder={true} element="section">
11+
<Section
12+
showSideBorders={false}
13+
showTopBorder={false}
14+
shouldCenter={false}
15+
element="section"
16+
>
1217
<HostedContentDisclaimer />
1318
</Section>
1419
);
1520
};
21+
1622
Default.storyName = 'default';
Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,31 @@
11
import { css } from '@emotion/react';
22
import {
33
palette as sourcePalette,
4+
space,
45
textSans12,
56
} from '@guardian/source/foundations';
67

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+
714
const textStyles = css`
815
${textSans12};
916
color: ${sourcePalette.neutral[46]};
1017
`;
1118

1219
export const HostedContentDisclaimer = () => {
1320
return (
14-
<p css={textStyles}>
15-
This article was paid for, produced and controlled by the advertiser
16-
rather than the publisher. It is subject to regulation by the
17-
Advertising Standards Authority. This content is produced by the
18-
advertiser with no involvement from Guardian News and Media staff.
19-
</p>
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>
2030
);
2131
};

dotcom-rendering/src/layouts/HostedArticleLayout.tsx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ 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';
@@ -25,6 +24,7 @@ import { palette } from '../palette';
2524
import type { Article } from '../types/article';
2625
import type { RenderingTarget } from '../types/renderingTarget';
2726
import { Stuck } from './lib/stickiness';
27+
import { HostedContentDisclaimer } from '../components/HostedContentDisclaimer';
2828

2929
interface Props {
3030
content: Article;
@@ -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)