2022-12-26 09:58:58 +00:00
|
|
|
import { Box, Typography, useTheme } from "@mui/material";
|
|
|
|
|
|
|
|
interface Props {
|
2023-10-18 13:41:34 +00:00
|
|
|
image: string;
|
|
|
|
text: string;
|
|
|
|
border?: string;
|
2022-12-26 09:58:58 +00:00
|
|
|
}
|
|
|
|
|
2023-06-07 14:20:45 +00:00
|
|
|
export default function CardWithImage({ image, text, border }: Props) {
|
2023-10-18 13:41:34 +00:00
|
|
|
const theme = useTheme();
|
2022-12-26 09:58:58 +00:00
|
|
|
|
2023-10-18 13:41:34 +00:00
|
|
|
return (
|
|
|
|
<Box
|
|
|
|
sx={{
|
|
|
|
minWidth: "315px",
|
|
|
|
flexGrow: 1,
|
|
|
|
borderRadius: "12px",
|
|
|
|
border: { border },
|
|
|
|
backgroundColor: "white",
|
|
|
|
boxShadow: "0 10px 15px rgba(0, 0, 0, 0.1)",
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
<img
|
|
|
|
style={{
|
|
|
|
width: "100%",
|
|
|
|
display: "block",
|
|
|
|
borderBottom: `1px solid ${theme.palette.grey2.main}`,
|
|
|
|
}}
|
|
|
|
src={image}
|
|
|
|
alt="card"
|
|
|
|
/>
|
|
|
|
<Typography color={theme.palette.grey3.main} p="20px">
|
|
|
|
{text}
|
|
|
|
</Typography>
|
|
|
|
</Box>
|
|
|
|
);
|
|
|
|
}
|