front-hub/src/pages/Payment/PaymentMethodCard.tsx

32 lines
926 B
TypeScript
Raw Normal View History

2022-11-25 18:52:46 +00:00
import { Box, Typography, useMediaQuery, useTheme } from "@mui/material";
2022-11-22 14:43:59 +00:00
interface Props {
name: string;
image: any;
}
export default function PaymentMethodCard({ name, image }: Props) {
2022-11-24 18:08:51 +00:00
const theme = useTheme();
2022-11-25 18:52:46 +00:00
const upSm = useMediaQuery(theme.breakpoints.up("sm"));
2022-11-22 14:43:59 +00:00
return (
<Box
sx={{
2022-11-25 18:52:46 +00:00
width: upSm ? "237px" : "100%",
2022-11-22 14:43:59 +00:00
p: "20px",
pr: "10px",
display: "flex",
borderRadius: "8px",
2022-12-15 16:24:17 +00:00
backgroundColor: theme.palette.background.default,
2022-11-24 19:22:30 +00:00
border: `1px solid ${theme.palette.grey2.main}`,
2022-11-22 14:43:59 +00:00
gap: "20px",
alignItems: "center",
2022-11-25 18:52:46 +00:00
flexWrap: "wrap",
2022-11-22 14:43:59 +00:00
}}
>
<img src={image} alt="payment method" />
2022-11-24 19:22:30 +00:00
<Typography sx={{ color: theme.palette.grey3.main }}>{name}</Typography>
2022-11-22 14:43:59 +00:00
</Box>
);
}