-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: resource page styles - shorts page (#1235)
- Loading branch information
1 parent
90b4463
commit 31079c4
Showing
15 changed files
with
372 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { Button, Card, CardContent, Typography } from '@mui/material'; | ||
import { useTranslations } from 'next-intl'; | ||
import { RELATED_CONTENT_CATEGORIES } from '../../constants/enums'; | ||
import Link from '../common/Link'; | ||
|
||
const cardStyle = { | ||
mt: 0, | ||
width: { xs: '100%', sm: 'calc(50% - 0.75rem)', md: 'calc(33% - 0.75rem)' }, | ||
mb: { xs: '1rem', sm: '1.5rem' }, | ||
} as const; | ||
|
||
const categoryStyle = { | ||
fontFamily: 'Montserrat, sans-serif', | ||
fontSize: '0.875rem !important', | ||
fontWeight: 500, | ||
} as const; | ||
|
||
interface RelatedContentProps { | ||
title: string; | ||
href: string; | ||
category: RELATED_CONTENT_CATEGORIES; | ||
} | ||
|
||
export const RelatedContentCard = (props: RelatedContentProps) => { | ||
const { title, href, category } = props; | ||
|
||
const t = useTranslations('Shared.relatedContent'); | ||
|
||
return ( | ||
<Card sx={cardStyle}> | ||
<CardContent> | ||
<Typography sx={categoryStyle}>{t(category)}</Typography> | ||
<Typography variant="h3">{title}</Typography> | ||
<Button component={Link} href={href} variant="contained"> | ||
Open | ||
</Button> | ||
</CardContent> | ||
</Card> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.