Skip to content

Commit 78532cd

Browse files
move css into variables
1 parent 8ac6247 commit 78532cd

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

dotcom-rendering/src/components/ProductCarouselCard.tsx

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ const productCarouselCardHeading = css`
2424
color: ${palette('--product-card-headline')};
2525
`;
2626

27+
const headingArea = css`
28+
grid-row: 1;
29+
`;
30+
const productCardRowFour = css`
31+
grid-row: 4;
32+
`;
33+
2734
const brandAndProductName = css`
2835
${headlineMedium17};
2936
`;
@@ -80,11 +87,7 @@ export const ProductCarouselCard = ({
8087
const h2Id = product.h2Id;
8188
return (
8289
<>
83-
<div
84-
css={css`
85-
grid-row: 1;
86-
`}
87-
>
90+
<div css={headingArea}>
8891
{hasHeading && (
8992
<>
9093
<div
@@ -117,11 +120,7 @@ export const ProductCarouselCard = ({
117120
<div css={imageArea}>
118121
<ProductCardImage format={format} image={product.image} />
119122
</div>
120-
<div
121-
css={css`
122-
grid-row: 4;
123-
`}
124-
>
123+
<div css={productCardRowFour}>
125124
{!hasHeading && (
126125
<div>
127126
<div css={brandAndProductName}>{product.brandName}</div>

0 commit comments

Comments
 (0)