Skip to content

Commit 810458c

Browse files
committed
Add none to padding size tpe for controlling 0 top padding
1 parent 90493c5 commit 810458c

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

dotcom-rendering/src/components/Masthead/HighlightsCard.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,11 @@ export const HighlightsCard = ({
172172

173173
{!isUndefined(starRating) &&
174174
(isInStarRatingVariant ? (
175-
<StarRating rating={starRating} size="small" />
175+
<StarRating
176+
rating={starRating}
177+
size="small"
178+
paddingSize="none"
179+
/>
176180
) : (
177181
<div css={starWrapper}>
178182
<StarRatingDeprecated

dotcom-rendering/src/components/StarRating/StarRating.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,14 @@ const determineSize = (size: RatingSizeType) => {
7676
}
7777
};
7878

79-
type PaddingSizeType = 'small' | 'medium' | 'large';
79+
type PaddingSizeType = 'small' | 'medium' | 'large' | 'none';
8080

8181
const determinePaddingTop = (size: PaddingSizeType) => {
8282
switch (size) {
83+
case 'none':
84+
return css`
85+
padding-top: 0;
86+
`;
8387
case 'small':
8488
return css`
8589
padding-top: ${space[1]}px;

0 commit comments

Comments
 (0)