@comicrelief/component-library 8.51.5 → 8.51.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Molecules/CTA/CTAMultiCard/CTAMultiCard.md +44 -6
- package/dist/components/Molecules/CTA/CTAMultiCard/CTAMultiCard.style.js +32 -23
- package/dist/components/Molecules/CTA/CTAMultiCard/__snapshots__/CTAMultiCard.test.js.snap +36 -36
- package/dist/components/Molecules/CTA/CTAMultiCard/example_data.json +1 -1
- package/dist/components/Molecules/CTA/CTASingleCard/CTASingleCard.md +4 -4
- package/dist/components/Molecules/CTA/CTASingleCard/CTASingleCard.style.js +12 -2
- package/dist/components/Molecules/CTA/CTASingleCard/__snapshots__/CTASingleCard.test.js.snap +43 -13
- package/dist/components/Molecules/CTA/shared/CTACard.style.js +20 -30
- package/package.json +1 -1
- package/src/components/Molecules/CTA/CTAMultiCard/CTAMultiCard.md +44 -6
- package/src/components/Molecules/CTA/CTAMultiCard/CTAMultiCard.style.js +43 -19
- package/src/components/Molecules/CTA/CTAMultiCard/__snapshots__/CTAMultiCard.test.js.snap +36 -36
- package/src/components/Molecules/CTA/CTAMultiCard/example_data.json +1 -1
- package/src/components/Molecules/CTA/CTASingleCard/CTASingleCard.md +4 -4
- package/src/components/Molecules/CTA/CTASingleCard/CTASingleCard.style.js +7 -0
- package/src/components/Molecules/CTA/CTASingleCard/__snapshots__/CTASingleCard.test.js.snap +43 -13
- package/src/components/Molecules/CTA/shared/CTACard.style.js +29 -39
|
@@ -110,7 +110,7 @@ const CardLink = exports.CardLink = _styledComponents.default.a.withConfig({
|
|
|
110
110
|
let {
|
|
111
111
|
isInteractive
|
|
112
112
|
} = _ref16;
|
|
113
|
-
return isInteractive && (0, _styledComponents.css)(["img{transition:transform 0.
|
|
113
|
+
return isInteractive && (0, _styledComponents.css)(["img{transition:transform 0.3s cubic-bezier(0.65,-0.19,0.37,1.16);}@media ", "{", ";transition:transform 0.4s cubic-bezier(0.68,-1.15,0.265,2.35);&:hover{box-shadow:0 0 1.5rem rgba(0,0,0,0.25);", " img{transform:scale(1.06);}", "{text-decoration:none;@media (min-width:", "px){color:", ";}}", "{opacity:1;}", "{@media (min-width:", "px){background:", ";}}}}"], _ref17 => {
|
|
114
114
|
let {
|
|
115
115
|
theme
|
|
116
116
|
} = _ref17;
|
|
@@ -130,7 +130,7 @@ const CardLink = exports.CardLink = _styledComponents.default.a.withConfig({
|
|
|
130
130
|
const CardWrapper = exports.CardWrapper = _styledComponents.default.div.withConfig({
|
|
131
131
|
displayName: "CTACardstyle__CardWrapper",
|
|
132
132
|
componentId: "sc-si8xx1-5"
|
|
133
|
-
})(["width:
|
|
133
|
+
})(["width:auto;flex-shrink:0;display:flex;flex-direction:column;align-self:stretch;", " ", " ", " ", ""], _ref20 => {
|
|
134
134
|
let {
|
|
135
135
|
isFullWidth
|
|
136
136
|
} = _ref20;
|
|
@@ -156,7 +156,7 @@ const CardWrapper = exports.CardWrapper = _styledComponents.default.div.withConf
|
|
|
156
156
|
isCarousel,
|
|
157
157
|
isFullWidth
|
|
158
158
|
} = _ref24;
|
|
159
|
-
return !isCarousel && !isFullWidth && (0, _styledComponents.css)(["@media (max-width:", "px){width:100%;max-width:100%;margin:0;}@media (min-width:", "px) and (max-width:", "px){align-self:stretch;", "
|
|
159
|
+
return !isCarousel && !isFullWidth && (0, _styledComponents.css)(["@media (max-width:", "px){width:100%;max-width:100%;margin:0;}@media (min-width:", "px) and (max-width:", "px){align-self:stretch;", " ", "}"], _allBreakpoints.breakpointValues.M - 1, _allBreakpoints.breakpointValues.M, _allBreakpoints.breakpointValues.L - 1, _ref25 => {
|
|
160
160
|
let {
|
|
161
161
|
columns
|
|
162
162
|
} = _ref25;
|
|
@@ -165,55 +165,45 @@ const CardWrapper = exports.CardWrapper = _styledComponents.default.div.withConf
|
|
|
165
165
|
let {
|
|
166
166
|
columns
|
|
167
167
|
} = _ref26;
|
|
168
|
-
return columns ===
|
|
168
|
+
return columns === 2 && (0, _styledComponents.css)(["@container cta-multi-card (max-width:705px){flex:0 0 100%;width:min(100%,345px);max-width:345px;margin-inline:auto;}"]);
|
|
169
169
|
});
|
|
170
170
|
}, _ref27 => {
|
|
171
171
|
let {
|
|
172
172
|
isFullWidth
|
|
173
173
|
} = _ref27;
|
|
174
|
-
return !isFullWidth && (0, _styledComponents.css)(["@media (min-width:", "px)
|
|
174
|
+
return !isFullWidth && (0, _styledComponents.css)(["@media (min-width:", "px){", " align-self:stretch;}"], _allBreakpoints.breakpointValues.L, _ref28 => {
|
|
175
175
|
let {
|
|
176
176
|
columns
|
|
177
177
|
} = _ref28;
|
|
178
|
-
return columns === 3 ? (0, _styledComponents.css)(["flex
|
|
179
|
-
}, _ref29 => {
|
|
180
|
-
let {
|
|
181
|
-
theme
|
|
182
|
-
} = _ref29;
|
|
183
|
-
return theme.allBreakpoints('XL');
|
|
184
|
-
}, _ref30 => {
|
|
185
|
-
let {
|
|
186
|
-
columns
|
|
187
|
-
} = _ref30;
|
|
188
|
-
return columns === 3 ? '363px' : '560px';
|
|
178
|
+
return columns === 3 ? (0, _styledComponents.css)(["flex:0 1 auto;width:clamp(286px,calc((100% - 4rem) / 3),363px);"]) : (0, _styledComponents.css)(["flex:0 1 auto;width:100%;"]);
|
|
189
179
|
});
|
|
190
180
|
});
|
|
191
181
|
const CopyAndLinkSection = exports.CopyAndLinkSection = _styledComponents.default.div.withConfig({
|
|
192
182
|
displayName: "CTACardstyle__CopyAndLinkSection",
|
|
193
183
|
componentId: "sc-si8xx1-6"
|
|
194
|
-
})(["width:100%;background:", ";display:flex;flex-direction:column;padding:2rem;flex:1;min-height:0;border-radius:0 0 1rem 1rem;", ""],
|
|
184
|
+
})(["width:100%;background:", ";display:flex;flex-direction:column;padding:2rem;flex:1;min-height:0;border-radius:0 0 1rem 1rem;", ""], _ref29 => {
|
|
195
185
|
let {
|
|
196
186
|
theme
|
|
197
|
-
} =
|
|
187
|
+
} = _ref29;
|
|
198
188
|
return theme.color('white');
|
|
199
|
-
},
|
|
189
|
+
}, _ref30 => {
|
|
200
190
|
let {
|
|
201
191
|
isSingleCard
|
|
202
|
-
} =
|
|
203
|
-
return isSingleCard && (0, _styledComponents.css)(["@media ", "{width:calc(200% / 3);min-width:384px;max-width:650px;flex:1;border-radius:0 1rem 1rem 0;}@media ", "{min-width:541px;max-width:790px;}@media ", "{width:789px;}"],
|
|
192
|
+
} = _ref30;
|
|
193
|
+
return isSingleCard && (0, _styledComponents.css)(["@media ", "{width:calc(200% / 3);min-width:384px;max-width:650px;flex:1;border-radius:0 1rem 1rem 0;}@media ", "{min-width:541px;max-width:790px;}@media ", "{width:789px;}"], _ref31 => {
|
|
204
194
|
let {
|
|
205
195
|
theme
|
|
206
|
-
} =
|
|
196
|
+
} = _ref31;
|
|
207
197
|
return theme.breakpoints2026('M');
|
|
208
|
-
},
|
|
198
|
+
}, _ref32 => {
|
|
209
199
|
let {
|
|
210
200
|
theme
|
|
211
|
-
} =
|
|
201
|
+
} = _ref32;
|
|
212
202
|
return theme.breakpoints2026('L');
|
|
213
|
-
},
|
|
203
|
+
}, _ref33 => {
|
|
214
204
|
let {
|
|
215
205
|
theme
|
|
216
|
-
} =
|
|
206
|
+
} = _ref33;
|
|
217
207
|
return theme.breakpoints2026('XL');
|
|
218
208
|
});
|
|
219
209
|
});
|
|
@@ -224,15 +214,15 @@ const Copy = exports.Copy = _styledComponents.default.div.withConfig({
|
|
|
224
214
|
const CardLabel = exports.CardLabel = _styledComponents.default.div.withConfig({
|
|
225
215
|
displayName: "CTACardstyle__CardLabel",
|
|
226
216
|
componentId: "sc-si8xx1-8"
|
|
227
|
-
})(["font-family:", ";font-size:14px;color:", ";
|
|
217
|
+
})(["font-family:", ";font-size:14px;color:", ";"], _ref34 => {
|
|
228
218
|
let {
|
|
229
219
|
theme
|
|
230
|
-
} =
|
|
220
|
+
} = _ref34;
|
|
231
221
|
return theme.fontFamilies('Montserrat');
|
|
232
|
-
},
|
|
222
|
+
}, _ref35 => {
|
|
233
223
|
let {
|
|
234
224
|
theme
|
|
235
|
-
} =
|
|
225
|
+
} = _ref35;
|
|
236
226
|
return theme.color('grey_3');
|
|
237
227
|
});
|
|
238
228
|
const CTA = exports.CTA = _styledComponents.default.div.withConfig({
|
package/package.json
CHANGED
|
@@ -39,9 +39,23 @@ const cardsWithRenderedBody = exampleData.cards.map(card => ({
|
|
|
39
39
|
external: null
|
|
40
40
|
}));
|
|
41
41
|
|
|
42
|
+
const cardsFour = [
|
|
43
|
+
...cardsWithRenderedBody,
|
|
44
|
+
{
|
|
45
|
+
...cardsWithRenderedBody[0],
|
|
46
|
+
id: 'example-4th-card',
|
|
47
|
+
title: 'Fourth card',
|
|
48
|
+
body: (
|
|
49
|
+
<Text tag="p">
|
|
50
|
+
Fourth card (added for layout testing)
|
|
51
|
+
</Text>
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
];
|
|
55
|
+
|
|
42
56
|
const data = {
|
|
43
57
|
...exampleData,
|
|
44
|
-
cards:
|
|
58
|
+
cards: cardsFour,
|
|
45
59
|
layout: "3 columns",
|
|
46
60
|
carouselOfCards: true,
|
|
47
61
|
backgroundColour: "grey_medium",
|
|
@@ -56,7 +70,7 @@ const data = {
|
|
|
56
70
|
|
|
57
71
|
### CTAMultiCard: Desktop Grid View (2 columns) with large padding
|
|
58
72
|
|
|
59
|
-
**NB: One card contains a lot of lorem ipsum text to demonstrate that all cards will match the height of the tallest sibling card. In mobile view, this example displays as a
|
|
73
|
+
**NB: One card contains a lot of lorem ipsum text to demonstrate that all cards will match the height of the tallest sibling card. In mobile view, this example displays as a carousel. This example also demonstrates larger vertical padding via `paddingAbove` / `paddingBelow` set to `4rem`, so it will appear with more space above and below the cards.**
|
|
60
74
|
|
|
61
75
|
```js
|
|
62
76
|
import CTAMultiCard from './CTAMultiCard';
|
|
@@ -96,7 +110,7 @@ const cardsWithRenderedBody = exampleData.cards.map((card, index) => ({
|
|
|
96
110
|
const dataWithLongText = {
|
|
97
111
|
...exampleData,
|
|
98
112
|
layout: "2 columns",
|
|
99
|
-
carouselOfCards:
|
|
113
|
+
carouselOfCards: true,
|
|
100
114
|
backgroundColour: "Transparent",
|
|
101
115
|
cards: cardsWithRenderedBody,
|
|
102
116
|
paddingAbove: '4rem',
|
|
@@ -108,7 +122,7 @@ const dataWithLongText = {
|
|
|
108
122
|
</div>;
|
|
109
123
|
```
|
|
110
124
|
|
|
111
|
-
### CTAMultiCard: Wrap behaviour (3 columns
|
|
125
|
+
### CTAMultiCard: Wrap behaviour (3 columns)
|
|
112
126
|
|
|
113
127
|
```js
|
|
114
128
|
import CTAMultiCard from './CTAMultiCard';
|
|
@@ -133,12 +147,36 @@ const cardsWithRenderedBody = exampleData.cards.map((card, index) => ({
|
|
|
133
147
|
external: null
|
|
134
148
|
}));
|
|
135
149
|
|
|
150
|
+
const cardsFive = [
|
|
151
|
+
...cardsWithRenderedBody,
|
|
152
|
+
{
|
|
153
|
+
...cardsWithRenderedBody[0],
|
|
154
|
+
id: 'wrap-example-3',
|
|
155
|
+
title: 'Fourth card',
|
|
156
|
+
body: (
|
|
157
|
+
<Text tag="p">
|
|
158
|
+
Short body text (4)
|
|
159
|
+
</Text>
|
|
160
|
+
)
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
...cardsWithRenderedBody[1],
|
|
164
|
+
id: 'wrap-example-4',
|
|
165
|
+
title: 'Fifth card',
|
|
166
|
+
body: (
|
|
167
|
+
<Text tag="p">
|
|
168
|
+
Short body text (5)
|
|
169
|
+
</Text>
|
|
170
|
+
)
|
|
171
|
+
}
|
|
172
|
+
];
|
|
173
|
+
|
|
136
174
|
const dataWrapExample = {
|
|
137
175
|
...exampleData,
|
|
138
176
|
layout: "3 columns",
|
|
139
|
-
carouselOfCards:
|
|
177
|
+
carouselOfCards: true,
|
|
140
178
|
backgroundColour: "rnd_26_light_pink",
|
|
141
|
-
cards:
|
|
179
|
+
cards: cardsFive,
|
|
142
180
|
paddingAbove: '2rem',
|
|
143
181
|
paddingBelow: '2rem'
|
|
144
182
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
2
|
import { breakpointValues } from '../../../../theme/shared/allBreakpoints';
|
|
3
|
-
import spacing from '../../../../theme/shared/spacing';
|
|
4
3
|
|
|
5
4
|
export const CardsQueryWrapper = styled.div`
|
|
6
5
|
/* Container for “single card per row” sizing.
|
|
@@ -24,11 +23,20 @@ export const CardsInner = styled.div`
|
|
|
24
23
|
max-width: 1152px;
|
|
25
24
|
margin: 0 auto;
|
|
26
25
|
|
|
27
|
-
/* Provide mobile gutters for non-carousel stack mode. */
|
|
28
26
|
${({ isCarousel }) => !isCarousel && css`
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
padding-
|
|
27
|
+
padding-inline: 1rem;
|
|
28
|
+
@media ${({ theme }) => theme.allBreakpoints('M')} {
|
|
29
|
+
padding-inline: 2rem;
|
|
30
|
+
}
|
|
31
|
+
`}
|
|
32
|
+
|
|
33
|
+
${({ isCarousel }) => isCarousel && css`
|
|
34
|
+
@media ${({ theme }) => theme.allBreakpoints('M')} {
|
|
35
|
+
padding-inline: 2rem;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@media (min-width: ${breakpointValues.XL}px) {
|
|
39
|
+
padding-inline: 0;
|
|
32
40
|
}
|
|
33
41
|
`}
|
|
34
42
|
`;
|
|
@@ -45,7 +53,7 @@ const CardsContainer = styled.div`
|
|
|
45
53
|
flex-wrap: wrap;
|
|
46
54
|
justify-content: center;
|
|
47
55
|
align-items: stretch;
|
|
48
|
-
width:
|
|
56
|
+
width: 100%;
|
|
49
57
|
max-width: 100%;
|
|
50
58
|
margin: 0 auto;
|
|
51
59
|
}
|
|
@@ -54,6 +62,28 @@ const CardsContainer = styled.div`
|
|
|
54
62
|
column-gap: 2rem;
|
|
55
63
|
}
|
|
56
64
|
|
|
65
|
+
/* Ensure 2-column layout behaves itself at L+. Applies when Splide is not active. */
|
|
66
|
+
${({ columns, useSplideCarousel }) => !useSplideCarousel && columns === 2 && css`
|
|
67
|
+
@media (min-width: ${breakpointValues.L}px) {
|
|
68
|
+
display: grid;
|
|
69
|
+
grid-template-columns: repeat(2, minmax(443px, 560px));
|
|
70
|
+
justify-content: center;
|
|
71
|
+
align-items: stretch;
|
|
72
|
+
column-gap: 2rem;
|
|
73
|
+
row-gap: 2rem;
|
|
74
|
+
width: 100%;
|
|
75
|
+
max-width: 100%;
|
|
76
|
+
margin: 0;
|
|
77
|
+
|
|
78
|
+
/* if there's an odd "orphan" card on the last row, center it. */
|
|
79
|
+
& > *:last-child:nth-child(odd) {
|
|
80
|
+
grid-column: 1 / -1;
|
|
81
|
+
justify-self: center;
|
|
82
|
+
width: min(100%, 560px);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
`}
|
|
86
|
+
|
|
57
87
|
// Carousel mode - horizontal scroll container (M and below)
|
|
58
88
|
${({ isCarousel }) => isCarousel && css`
|
|
59
89
|
@media (max-width: ${breakpointValues.L - 1}px) {
|
|
@@ -66,6 +96,12 @@ const CardsContainer = styled.div`
|
|
|
66
96
|
padding: 0.75rem 1rem;
|
|
67
97
|
gap: 0;
|
|
68
98
|
|
|
99
|
+
/* We need this so that the box shadows of the cards are not clipped off */
|
|
100
|
+
.splide,
|
|
101
|
+
.splide__track {
|
|
102
|
+
overflow: visible
|
|
103
|
+
}
|
|
104
|
+
|
|
69
105
|
.splide__list {
|
|
70
106
|
align-items: stretch;
|
|
71
107
|
}
|
|
@@ -82,7 +118,7 @@ const CardsContainer = styled.div`
|
|
|
82
118
|
margin: 0;
|
|
83
119
|
max-width: 100%;
|
|
84
120
|
overflow-x: auto;
|
|
85
|
-
overflow-y:
|
|
121
|
+
overflow-y: visible;
|
|
86
122
|
-webkit-overflow-scrolling: touch;
|
|
87
123
|
scroll-snap-type: x mandatory;
|
|
88
124
|
padding: 0.75rem 1rem;
|
|
@@ -96,17 +132,5 @@ const CardsContainer = styled.div`
|
|
|
96
132
|
}
|
|
97
133
|
`}
|
|
98
134
|
|
|
99
|
-
// Desktop grid layout for XL breakpoint - 3 columns
|
|
100
|
-
@media ${({ theme }) => theme.allBreakpoints('XL')} {
|
|
101
|
-
${({ columns }) => columns === 3 && css`
|
|
102
|
-
display: grid;
|
|
103
|
-
justify-content: center;
|
|
104
|
-
align-items: stretch;
|
|
105
|
-
grid-template-columns: repeat(3, minmax(0, 363px));
|
|
106
|
-
width: 100%;
|
|
107
|
-
margin: 0 auto;
|
|
108
|
-
max-width: 100%;
|
|
109
|
-
`}
|
|
110
|
-
}
|
|
111
135
|
`;
|
|
112
136
|
export default CardsContainer;
|
|
@@ -8,16 +8,16 @@ exports[`handles data structure correctly 1`] = `
|
|
|
8
8
|
className="CTAMultiCardstyle__CardsSection-sc-gsdqzv-1 ehBqzi"
|
|
9
9
|
>
|
|
10
10
|
<div
|
|
11
|
-
className="CTAMultiCardstyle__CardsInner-sc-gsdqzv-2
|
|
11
|
+
className="CTAMultiCardstyle__CardsInner-sc-gsdqzv-2 jdzsUU"
|
|
12
12
|
>
|
|
13
13
|
<div
|
|
14
|
-
className="CTAMultiCardstyle__CardsContainer-sc-gsdqzv-3
|
|
14
|
+
className="CTAMultiCardstyle__CardsContainer-sc-gsdqzv-3 icRtAH"
|
|
15
15
|
>
|
|
16
16
|
<div
|
|
17
|
-
className="CTACardstyle__CardWrapper-sc-si8xx1-5
|
|
17
|
+
className="CTACardstyle__CardWrapper-sc-si8xx1-5 jZEwGJ"
|
|
18
18
|
>
|
|
19
19
|
<a
|
|
20
|
-
className="CTACardstyle__CardLink-sc-si8xx1-4
|
|
20
|
+
className="CTACardstyle__CardLink-sc-si8xx1-4 eIrLL"
|
|
21
21
|
href="/test"
|
|
22
22
|
rel={null}
|
|
23
23
|
target="self"
|
|
@@ -95,7 +95,7 @@ exports[`handles data structure correctly 1`] = `
|
|
|
95
95
|
</a>
|
|
96
96
|
</div>
|
|
97
97
|
<div
|
|
98
|
-
className="CTACardstyle__CardWrapper-sc-si8xx1-5
|
|
98
|
+
className="CTACardstyle__CardWrapper-sc-si8xx1-5 jZEwGJ"
|
|
99
99
|
>
|
|
100
100
|
<div
|
|
101
101
|
className="CTACardstyle__CardLink-sc-si8xx1-4 lbrljd"
|
|
@@ -141,10 +141,10 @@ exports[`handles data structure correctly 1`] = `
|
|
|
141
141
|
</div>
|
|
142
142
|
</div>
|
|
143
143
|
<div
|
|
144
|
-
className="CTACardstyle__CardWrapper-sc-si8xx1-5
|
|
144
|
+
className="CTACardstyle__CardWrapper-sc-si8xx1-5 jZEwGJ"
|
|
145
145
|
>
|
|
146
146
|
<a
|
|
147
|
-
className="CTACardstyle__CardLink-sc-si8xx1-4
|
|
147
|
+
className="CTACardstyle__CardLink-sc-si8xx1-4 eIrLL"
|
|
148
148
|
href="/test"
|
|
149
149
|
rel={null}
|
|
150
150
|
target="self"
|
|
@@ -222,10 +222,10 @@ exports[`handles data structure correctly 1`] = `
|
|
|
222
222
|
</a>
|
|
223
223
|
</div>
|
|
224
224
|
<div
|
|
225
|
-
className="CTACardstyle__CardWrapper-sc-si8xx1-5
|
|
225
|
+
className="CTACardstyle__CardWrapper-sc-si8xx1-5 jZEwGJ"
|
|
226
226
|
>
|
|
227
227
|
<a
|
|
228
|
-
className="CTACardstyle__CardLink-sc-si8xx1-4
|
|
228
|
+
className="CTACardstyle__CardLink-sc-si8xx1-4 eIrLL"
|
|
229
229
|
href="/test-no-image"
|
|
230
230
|
rel={null}
|
|
231
231
|
target="self"
|
|
@@ -291,16 +291,16 @@ exports[`renders 2 columns layout correctly 1`] = `
|
|
|
291
291
|
className="CTAMultiCardstyle__CardsSection-sc-gsdqzv-1 eznbgX"
|
|
292
292
|
>
|
|
293
293
|
<div
|
|
294
|
-
className="CTAMultiCardstyle__CardsInner-sc-gsdqzv-2
|
|
294
|
+
className="CTAMultiCardstyle__CardsInner-sc-gsdqzv-2 kjrrbi"
|
|
295
295
|
>
|
|
296
296
|
<div
|
|
297
|
-
className="CTAMultiCardstyle__CardsContainer-sc-gsdqzv-3
|
|
297
|
+
className="CTAMultiCardstyle__CardsContainer-sc-gsdqzv-3 bWeGAp"
|
|
298
298
|
>
|
|
299
299
|
<div
|
|
300
|
-
className="CTACardstyle__CardWrapper-sc-si8xx1-5
|
|
300
|
+
className="CTACardstyle__CardWrapper-sc-si8xx1-5 xdzCi"
|
|
301
301
|
>
|
|
302
302
|
<a
|
|
303
|
-
className="CTACardstyle__CardLink-sc-si8xx1-4
|
|
303
|
+
className="CTACardstyle__CardLink-sc-si8xx1-4 eIrLL"
|
|
304
304
|
href="/test"
|
|
305
305
|
rel={null}
|
|
306
306
|
target="self"
|
|
@@ -378,7 +378,7 @@ exports[`renders 2 columns layout correctly 1`] = `
|
|
|
378
378
|
</a>
|
|
379
379
|
</div>
|
|
380
380
|
<div
|
|
381
|
-
className="CTACardstyle__CardWrapper-sc-si8xx1-5
|
|
381
|
+
className="CTACardstyle__CardWrapper-sc-si8xx1-5 xdzCi"
|
|
382
382
|
>
|
|
383
383
|
<div
|
|
384
384
|
className="CTACardstyle__CardLink-sc-si8xx1-4 lbrljd"
|
|
@@ -424,10 +424,10 @@ exports[`renders 2 columns layout correctly 1`] = `
|
|
|
424
424
|
</div>
|
|
425
425
|
</div>
|
|
426
426
|
<div
|
|
427
|
-
className="CTACardstyle__CardWrapper-sc-si8xx1-5
|
|
427
|
+
className="CTACardstyle__CardWrapper-sc-si8xx1-5 xdzCi"
|
|
428
428
|
>
|
|
429
429
|
<a
|
|
430
|
-
className="CTACardstyle__CardLink-sc-si8xx1-4
|
|
430
|
+
className="CTACardstyle__CardLink-sc-si8xx1-4 eIrLL"
|
|
431
431
|
href="/test"
|
|
432
432
|
rel={null}
|
|
433
433
|
target="self"
|
|
@@ -505,10 +505,10 @@ exports[`renders 2 columns layout correctly 1`] = `
|
|
|
505
505
|
</a>
|
|
506
506
|
</div>
|
|
507
507
|
<div
|
|
508
|
-
className="CTACardstyle__CardWrapper-sc-si8xx1-5
|
|
508
|
+
className="CTACardstyle__CardWrapper-sc-si8xx1-5 xdzCi"
|
|
509
509
|
>
|
|
510
510
|
<a
|
|
511
|
-
className="CTACardstyle__CardLink-sc-si8xx1-4
|
|
511
|
+
className="CTACardstyle__CardLink-sc-si8xx1-4 eIrLL"
|
|
512
512
|
href="/test-no-image"
|
|
513
513
|
rel={null}
|
|
514
514
|
target="self"
|
|
@@ -574,16 +574,16 @@ exports[`renders carousel mode correctly 1`] = `
|
|
|
574
574
|
className="CTAMultiCardstyle__CardsSection-sc-gsdqzv-1 eznbgX"
|
|
575
575
|
>
|
|
576
576
|
<div
|
|
577
|
-
className="CTAMultiCardstyle__CardsInner-sc-gsdqzv-2
|
|
577
|
+
className="CTAMultiCardstyle__CardsInner-sc-gsdqzv-2 kjrrbi"
|
|
578
578
|
>
|
|
579
579
|
<div
|
|
580
|
-
className="CTAMultiCardstyle__CardsContainer-sc-gsdqzv-3
|
|
580
|
+
className="CTAMultiCardstyle__CardsContainer-sc-gsdqzv-3 eomXiE"
|
|
581
581
|
>
|
|
582
582
|
<div
|
|
583
|
-
className="CTACardstyle__CardWrapper-sc-si8xx1-5
|
|
583
|
+
className="CTACardstyle__CardWrapper-sc-si8xx1-5 eieQSs"
|
|
584
584
|
>
|
|
585
585
|
<a
|
|
586
|
-
className="CTACardstyle__CardLink-sc-si8xx1-4
|
|
586
|
+
className="CTACardstyle__CardLink-sc-si8xx1-4 eIrLL"
|
|
587
587
|
href="/test"
|
|
588
588
|
rel={null}
|
|
589
589
|
target="self"
|
|
@@ -661,7 +661,7 @@ exports[`renders carousel mode correctly 1`] = `
|
|
|
661
661
|
</a>
|
|
662
662
|
</div>
|
|
663
663
|
<div
|
|
664
|
-
className="CTACardstyle__CardWrapper-sc-si8xx1-5
|
|
664
|
+
className="CTACardstyle__CardWrapper-sc-si8xx1-5 eieQSs"
|
|
665
665
|
>
|
|
666
666
|
<div
|
|
667
667
|
className="CTACardstyle__CardLink-sc-si8xx1-4 lbrljd"
|
|
@@ -707,10 +707,10 @@ exports[`renders carousel mode correctly 1`] = `
|
|
|
707
707
|
</div>
|
|
708
708
|
</div>
|
|
709
709
|
<div
|
|
710
|
-
className="CTACardstyle__CardWrapper-sc-si8xx1-5
|
|
710
|
+
className="CTACardstyle__CardWrapper-sc-si8xx1-5 eieQSs"
|
|
711
711
|
>
|
|
712
712
|
<a
|
|
713
|
-
className="CTACardstyle__CardLink-sc-si8xx1-4
|
|
713
|
+
className="CTACardstyle__CardLink-sc-si8xx1-4 eIrLL"
|
|
714
714
|
href="/test"
|
|
715
715
|
rel={null}
|
|
716
716
|
target="self"
|
|
@@ -788,10 +788,10 @@ exports[`renders carousel mode correctly 1`] = `
|
|
|
788
788
|
</a>
|
|
789
789
|
</div>
|
|
790
790
|
<div
|
|
791
|
-
className="CTACardstyle__CardWrapper-sc-si8xx1-5
|
|
791
|
+
className="CTACardstyle__CardWrapper-sc-si8xx1-5 eieQSs"
|
|
792
792
|
>
|
|
793
793
|
<a
|
|
794
|
-
className="CTACardstyle__CardLink-sc-si8xx1-4
|
|
794
|
+
className="CTACardstyle__CardLink-sc-si8xx1-4 eIrLL"
|
|
795
795
|
href="/test-no-image"
|
|
796
796
|
rel={null}
|
|
797
797
|
target="self"
|
|
@@ -857,16 +857,16 @@ exports[`renders correctly with data prop 1`] = `
|
|
|
857
857
|
className="CTAMultiCardstyle__CardsSection-sc-gsdqzv-1 eznbgX"
|
|
858
858
|
>
|
|
859
859
|
<div
|
|
860
|
-
className="CTAMultiCardstyle__CardsInner-sc-gsdqzv-2
|
|
860
|
+
className="CTAMultiCardstyle__CardsInner-sc-gsdqzv-2 kjrrbi"
|
|
861
861
|
>
|
|
862
862
|
<div
|
|
863
|
-
className="CTAMultiCardstyle__CardsContainer-sc-gsdqzv-3
|
|
863
|
+
className="CTAMultiCardstyle__CardsContainer-sc-gsdqzv-3 eomXiE"
|
|
864
864
|
>
|
|
865
865
|
<div
|
|
866
|
-
className="CTACardstyle__CardWrapper-sc-si8xx1-5
|
|
866
|
+
className="CTACardstyle__CardWrapper-sc-si8xx1-5 eieQSs"
|
|
867
867
|
>
|
|
868
868
|
<a
|
|
869
|
-
className="CTACardstyle__CardLink-sc-si8xx1-4
|
|
869
|
+
className="CTACardstyle__CardLink-sc-si8xx1-4 eIrLL"
|
|
870
870
|
href="/test"
|
|
871
871
|
rel={null}
|
|
872
872
|
target="self"
|
|
@@ -944,7 +944,7 @@ exports[`renders correctly with data prop 1`] = `
|
|
|
944
944
|
</a>
|
|
945
945
|
</div>
|
|
946
946
|
<div
|
|
947
|
-
className="CTACardstyle__CardWrapper-sc-si8xx1-5
|
|
947
|
+
className="CTACardstyle__CardWrapper-sc-si8xx1-5 eieQSs"
|
|
948
948
|
>
|
|
949
949
|
<div
|
|
950
950
|
className="CTACardstyle__CardLink-sc-si8xx1-4 lbrljd"
|
|
@@ -990,10 +990,10 @@ exports[`renders correctly with data prop 1`] = `
|
|
|
990
990
|
</div>
|
|
991
991
|
</div>
|
|
992
992
|
<div
|
|
993
|
-
className="CTACardstyle__CardWrapper-sc-si8xx1-5
|
|
993
|
+
className="CTACardstyle__CardWrapper-sc-si8xx1-5 eieQSs"
|
|
994
994
|
>
|
|
995
995
|
<a
|
|
996
|
-
className="CTACardstyle__CardLink-sc-si8xx1-4
|
|
996
|
+
className="CTACardstyle__CardLink-sc-si8xx1-4 eIrLL"
|
|
997
997
|
href="/test"
|
|
998
998
|
rel={null}
|
|
999
999
|
target="self"
|
|
@@ -1071,10 +1071,10 @@ exports[`renders correctly with data prop 1`] = `
|
|
|
1071
1071
|
</a>
|
|
1072
1072
|
</div>
|
|
1073
1073
|
<div
|
|
1074
|
-
className="CTACardstyle__CardWrapper-sc-si8xx1-5
|
|
1074
|
+
className="CTACardstyle__CardWrapper-sc-si8xx1-5 eieQSs"
|
|
1075
1075
|
>
|
|
1076
1076
|
<a
|
|
1077
|
-
className="CTACardstyle__CardLink-sc-si8xx1-4
|
|
1077
|
+
className="CTACardstyle__CardLink-sc-si8xx1-4 eIrLL"
|
|
1078
1078
|
href="/test-no-image"
|
|
1079
1079
|
rel={null}
|
|
1080
1080
|
target="self"
|
|
@@ -47,7 +47,7 @@ const exampleCard = {
|
|
|
47
47
|
external: null
|
|
48
48
|
};
|
|
49
49
|
|
|
50
|
-
<div style={{
|
|
50
|
+
<div style={{ background: '#E1E2E3' }}>
|
|
51
51
|
<CTASingleCard data={{ card: exampleCard, backgroundColour: 'Transparent', paddingAbove: '1rem', paddingBelow: '2rem' }} />
|
|
52
52
|
</div>;
|
|
53
53
|
```
|
|
@@ -63,7 +63,7 @@ const exampleCard = {
|
|
|
63
63
|
label: 'Example Label',
|
|
64
64
|
body: (
|
|
65
65
|
<Text tag="p">
|
|
66
|
-
Single card
|
|
66
|
+
Single card
|
|
67
67
|
</Text>
|
|
68
68
|
),
|
|
69
69
|
link: "/test",
|
|
@@ -76,7 +76,7 @@ const exampleCard = {
|
|
|
76
76
|
external: null
|
|
77
77
|
};
|
|
78
78
|
|
|
79
|
-
<div style={{
|
|
79
|
+
<div style={{ background: '#E1E2E3' }}>
|
|
80
80
|
<CTASingleCard data={{ card: exampleCard, backgroundColour: 'grey_medium', paddingAbove: '1rem', paddingBelow: '2rem' }} />
|
|
81
81
|
</div>;
|
|
82
82
|
```
|
|
@@ -95,7 +95,7 @@ const exampleCardWithLongText = {
|
|
|
95
95
|
body: (
|
|
96
96
|
<>
|
|
97
97
|
<Text tag="p">
|
|
98
|
-
|
|
98
|
+
Single card with background colour set on the full-width section
|
|
99
99
|
</Text>
|
|
100
100
|
<Text tag="p">
|
|
101
101
|
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.
|
|
@@ -3,6 +3,13 @@ import styled from 'styled-components';
|
|
|
3
3
|
export const SingleCardSection = styled.div`
|
|
4
4
|
padding-top: ${({ paddingAbove }) => paddingAbove};
|
|
5
5
|
padding-bottom: ${({ paddingBelow }) => paddingBelow};
|
|
6
|
+
padding-inline: 1rem;
|
|
7
|
+
@media ${({ theme }) => theme.breakpoints2026('M')} {
|
|
8
|
+
padding-inline: 2rem;
|
|
9
|
+
}
|
|
10
|
+
@media ${({ theme }) => theme.breakpoints2026('L')} {
|
|
11
|
+
padding-inline: 4rem;
|
|
12
|
+
}
|
|
6
13
|
width: 100%;
|
|
7
14
|
background: ${({ theme, backgroundColor }) => theme.color(backgroundColor)};
|
|
8
15
|
`;
|