Skip to content

Commit e622426

Browse files
Add multiple left col card buttons
1 parent c9da4ee commit e622426

File tree

2 files changed

+52
-4
lines changed

2 files changed

+52
-4
lines changed

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

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,53 @@ export const SingleCta = () => (
8080
lowestPrice={'£89.99'}
8181
/>
8282
);
83+
84+
export const ShortCta = () => (
85+
<LeftColProductCard
86+
{...sampleProductCard}
87+
productCtas={[
88+
{
89+
url: 'https://www.theguardian.com',
90+
label: '£8 at Z',
91+
},
92+
]}
93+
lowestPrice={'£89.99'}
94+
/>
95+
);
96+
97+
export const LotsOfCtas = () => (
98+
<LeftColProductCard
99+
{...sampleProductCard}
100+
productCtas={[
101+
{
102+
url: 'https://www.theguardian.com',
103+
label: '£89.99 at Cotswolds Outdoors',
104+
},
105+
{
106+
url: 'https://www.theguardian.com',
107+
label: '£89 at Zara',
108+
},
109+
{
110+
url: 'https://www.theguardian.com',
111+
label: '£9 at Kenwood',
112+
},
113+
{
114+
url: 'https://www.theguardian.com',
115+
label: '£70 at Amazon',
116+
},
117+
{
118+
url: 'https://www.theguardian.com',
119+
label: '£12 for 10 at John Lewis',
120+
},
121+
{
122+
url: 'https://www.theguardian.com',
123+
label: '£30 at eBay',
124+
},
125+
{
126+
url: 'https://www.theguardian.com',
127+
label: '£45 at Etsy',
128+
},
129+
]}
130+
lowestPrice={'£89.99'}
131+
/>
132+
);

dotcom-rendering/src/components/ProductLinkButton.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import type { SerializedStyles } from '@emotion/react';
22
import { css } from '@emotion/react';
3-
import { space } from '@guardian/source/foundations';
43
import type {
54
ButtonPriority,
65
ThemeButton,
@@ -64,10 +63,9 @@ export const ProductLinkButton = ({
6463
>
6564
<span
6665
css={css`
67-
text-align: center;
6866
white-space: normal;
69-
max-width: 100%;
70-
padding: ${space[1]}px 0;
67+
width: 100%;
68+
padding: 10px 0 10px;
7169
`}
7270
>
7371
{label}

0 commit comments

Comments
 (0)