Skip to content

Commit 1cf1d22

Browse files
committed
Adjust feast thrasher style on apps
1 parent 5a8af24 commit 1cf1d22

File tree

3 files changed

+27
-5
lines changed

3 files changed

+27
-5
lines changed

dotcom-rendering/src/components/marketing/thrashers/FeastThrasher.stories.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,14 @@ const meta = {
99
export default meta;
1010
type Story = StoryObj<typeof meta>;
1111

12-
export const FeastThrasher: Story = {};
12+
export const FeastThrasher: Story = {
13+
args: {
14+
renderingTarget: 'Web',
15+
},
16+
};
17+
18+
export const FeastThrasherApps: Story = {
19+
args: {
20+
renderingTarget: 'Apps',
21+
},
22+
};

dotcom-rendering/src/components/marketing/thrashers/FeastThrasher.tsx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,20 @@ import {
1515
SvgArrowRightStraight,
1616
SvgGuardianLogo,
1717
} from '@guardian/source/react-components';
18+
import type { RenderingTarget } from '../../../types/renderingTarget';
1819

1920
const styles = {
20-
container: css`
21+
container: (renderingTarget: RenderingTarget) => css`
2122
/* stylelint-disable-next-line color-no-hex */
2223
background: #f7efe9;
2324
color: ${palette.neutral[0]};
25+
${renderingTarget === 'Apps'
26+
? css`
27+
margin: 0 4px;
28+
border-radius: 8px;
29+
overflow: hidden;
30+
`
31+
: ''}
2432
`,
2533
grid: css`
2634
display: grid;
@@ -113,9 +121,13 @@ const tabletImageUrl =
113121
const mobileAndDesktopImageUrl =
114122
'https://media.guim.co.uk/a0cc02db1394f8710bdce008e2297759098d53b3/0_0_2000_1200/2000.png';
115123

116-
export const FeastThrasher = () => {
124+
interface Props {
125+
renderingTarget: RenderingTarget;
126+
}
127+
128+
export const FeastThrasher = ({ renderingTarget }: Props) => {
117129
return (
118-
<div css={styles.container}>
130+
<div css={styles.container(renderingTarget)}>
119131
<div css={styles.grid}>
120132
<div css={styles.logo}>
121133
<SvgGuardianLogo

dotcom-rendering/src/server/render.thrasher.apps.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const thrasherTemplate = (html: string, css: string): string => {
2727

2828
export const renderThrasher = (name: ThrasherName): { html: string } => {
2929
const { html, extractedCss } = renderToStringWithEmotion(
30-
<>{name === 'feast' && <FeastThrasher />}</>,
30+
<>{name === 'feast' && <FeastThrasher renderingTarget={'Apps'} />}</>,
3131
);
3232

3333
const pageHtml = thrasherTemplate(html, extractedCss);

0 commit comments

Comments
 (0)