Skip to content

Commit

Permalink
reorder components
Browse files Browse the repository at this point in the history
  • Loading branch information
abeddow91 committed Nov 20, 2024
1 parent bf4fbe1 commit f55078a
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions dotcom-rendering/src/components/CardHeadline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,23 +174,6 @@ const getFontSize = (sizes: ResponsiveFontSize, family: FontFamily) => {
`;
};

export const WithLink = ({
linkTo,
children,
}: {
linkTo?: string;
children: React.ReactNode;
}) => {
if (linkTo) {
return (
<Link href={linkTo} cssOverrides={sublinkStyles}>
{children}
</Link>
);
}
return <>{children}</>;
};

const getFonts = (format: ArticleFormat, fontSizes: ResponsiveFontSize) => {
if (format.theme === ArticleSpecial.Labs) {
return getFontSize(fontSizes, FontFamily.TextSans);
Expand All @@ -208,6 +191,23 @@ const getFonts = (format: ArticleFormat, fontSizes: ResponsiveFontSize) => {
return getFontSize(fontSizes, FontFamily.HeadlineMedium);
};

export const WithLink = ({
linkTo,
children,
}: {
linkTo?: string;
children: React.ReactNode;
}) => {
if (linkTo) {
return (
<Link href={linkTo} cssOverrides={sublinkStyles}>
{children}
</Link>
);
}
return <>{children}</>;
};

export const CardHeadline = ({
headlineText,
format,
Expand Down

0 comments on commit f55078a

Please sign in to comment.