// nextjs components
import Link from "next/link"
// @mui material components
import Card from "@mui/material/Card"
import CardMedia from "@mui/material/CardMedia"
import Tooltip from "@mui/material/Tooltip"
// ThreeD Garden components
import MDBox from "~/components/mui/MDBox"
import MDTypography from "~/components/mui/MDTypography"
import MDButton from "~/components/mui/MDButton"
import MDAvatar from "~/components/mui/MDAvatar"
// Declaring props types for DefaultProjectCard
interface Props {
image: string
label: string
title: string
description: string
action: {
type: "external" | "internal"
route: string
color:
| "primary"
| "secondary"
| "info"
| "success"
| "warning"
| "error"
| "light"
| "dark"
| "white"
label: string
}
authors?: {
image: string
name: string
}[]
[key: string]: any
}
function DefaultProjectCard({
image,
label,
title,
description,
action,
authors,
}: Props): JSX.Element {
const renderAuthors = authors.map(({ image: media, name }) => (
({
border: `${borderWidth[2]} solid ${white.main}`,
cursor: "pointer",
position: "relative",
ml: -1.25,
"&:hover, &:focus": {
zIndex: "10",
},
})}
/>
))
return (
md,
objectFit: "cover",
objectPosition: "center",
}}
/>
{label}
{action.type === "internal" ? (
{title}
) : (
{title}
)}
{description}
{action.type === "internal" ? (
{action.label}
) : (
{action.label}
)}
{renderAuthors}
)
}
// Declaring default props for DefaultProjectCard
DefaultProjectCard.defaultProps = {
authors: [],
}
export default DefaultProjectCard