Skip to content

Commit fa86c04

Browse files
deedeehon-ye
authored andcommitted
Update Contributor font styles for Labs Galleries
Co-authored-by: Onye Anuna <[email protected]>
1 parent e5d6189 commit fa86c04

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

dotcom-rendering/src/components/Contributor.tsx

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { css } from '@emotion/react';
22
import {
33
headlineMedium17,
44
palette as sourcePalette,
5+
textEgyptianItalic17,
56
textSansItalic17,
67
until,
78
} from '@guardian/source/foundations';
@@ -69,10 +70,16 @@ const bylineStyles = (format: ArticleFormat) => {
6970
}
7071
};
7172

72-
const labsBylineStyles = css`
73-
${textSansItalic17};
74-
line-height: 1.4;
75-
`;
73+
const labsBylineStyles = (design: ArticleDesign) => {
74+
const textStyle =
75+
design === ArticleDesign.Gallery
76+
? textEgyptianItalic17
77+
: textSansItalic17;
78+
return css`
79+
${textStyle};
80+
line-height: 1.4;
81+
`;
82+
};
7683

7784
type Props = {
7885
byline?: string;
@@ -96,7 +103,8 @@ export const Contributor = ({ byline, tags, format, source }: Props) => (
96103
}
97104
css={[
98105
bylineStyles(format),
99-
format.theme === ArticleSpecial.Labs && labsBylineStyles,
106+
format.theme === ArticleSpecial.Labs &&
107+
labsBylineStyles(format.design),
100108
format.design === ArticleDesign.LiveBlog &&
101109
standfirstColourBelowDesktop,
102110
]}

0 commit comments

Comments
 (0)