This repository has been archived by the owner on Jun 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
60ecb47
commit 2fd4325
Showing
4 changed files
with
91 additions
and
4 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,45 @@ | ||
import type { FC, ReactElement, ReactNode } from "react"; | ||
import Grid from "@mui/material/Grid"; | ||
import Card from "@mui/material/Card"; | ||
import CardContent from "@mui/material/CardContent"; | ||
import CardMedia from "@mui/material/CardMedia"; | ||
import Typography from "@mui/material/Typography"; | ||
import CardActionArea from "@mui/material/CardActionArea"; | ||
|
||
interface AboutCardProps { | ||
readonly imageName: string; | ||
readonly name: string; | ||
readonly children: ReactNode; | ||
} | ||
|
||
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types | ||
const AboutCard: FC<AboutCardProps> = ({ | ||
imageName, | ||
name, | ||
children, | ||
}: AboutCardProps): ReactElement | null => { | ||
return ( | ||
<Grid item> | ||
<Card sx={{ width: 250, boxShadow: 1 }}> | ||
<CardActionArea> | ||
<CardMedia | ||
component="img" | ||
height={200} | ||
image={`/images/${imageName}`} | ||
alt={`picture of ${name}`} | ||
/> | ||
<CardContent sx={{ height: 200 }}> | ||
<Typography variant="h6" gutterBottom> | ||
{name} | ||
</Typography> | ||
<Typography variant="body2" color="text.secondary"> | ||
{children} | ||
</Typography> | ||
</CardContent> | ||
</CardActionArea> | ||
</Card> | ||
</Grid> | ||
); | ||
}; | ||
|
||
export default AboutCard; |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.