Skip to content

Commit 7bac6b4

Browse files
committed
Add wrapper to SponsoredContentLabel in FeatureCard and update var name
1 parent 2f9cd31 commit 7bac6b4

File tree

2 files changed

+20
-14
lines changed

2 files changed

+20
-14
lines changed

dotcom-rendering/src/components/FeatureCard.tsx

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,10 @@ const waveformStyles = css`
235235
opacity: 0.3;
236236
`;
237237

238+
const wrapperStyles = css`
239+
padding-top: ${space[3]}px;
240+
`;
241+
238242
const getMedia = ({
239243
imageUrl,
240244
imageAltText,
@@ -404,7 +408,7 @@ export const FeatureCard = ({
404408

405409
const showCommentCount = discussionId !== undefined;
406410

407-
const dataAttributes = branding
411+
const labsDataAttributes = branding
408412
? getOphanComponents({
409413
branding,
410414
locationPrefix: 'front-card',
@@ -734,18 +738,20 @@ export const FeatureCard = ({
734738
/>
735739
)}
736740
{isLabs && branding && showLabsRedesign && (
737-
<SponsoredContentLabel
738-
branding={branding}
739-
containerPalette={containerPalette}
740-
orientation="horizontal"
741-
alignment="end"
742-
ophanComponentLink={
743-
dataAttributes?.ophanComponentLink
744-
}
745-
ophanComponentName={
746-
dataAttributes?.ophanComponentName
747-
}
748-
/>
741+
<div css={wrapperStyles}>
742+
<SponsoredContentLabel
743+
branding={branding}
744+
containerPalette={containerPalette}
745+
orientation="horizontal"
746+
alignment="end"
747+
ophanComponentLink={
748+
labsDataAttributes?.ophanComponentLink
749+
}
750+
ophanComponentName={
751+
labsDataAttributes?.ophanComponentName
752+
}
753+
/>
754+
</div>
749755
)}
750756
</div>
751757
</ContainerOverrides>

dotcom-rendering/src/components/SponsoredContentLabel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const labelStyles = css`
3434
`;
3535

3636
const wrapperStyles = css`
37-
padding-top: ${space[4]}px;
37+
padding-top: ${space[1]}px;
3838
display: flex;
3939
justify-content: end;
4040
`;

0 commit comments

Comments
 (0)