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

32 lines
801 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: string;
2022-11-22 14:43:59 +00:00
}
export default function PaymentMethodCard({ name, image }: Props) {
const theme = useTheme();
const upSm = useMediaQuery(theme.breakpoints.up("sm"));
2022-11-22 14:43:59 +00:00
return (
<Box
sx={{
width: upSm ? "237px" : "100%",
p: "20px",
pr: "10px",
display: "flex",
borderRadius: "8px",
backgroundColor: theme.palette.background.default,
border: `1px solid ${theme.palette.grey2.main}`,
gap: "20px",
alignItems: "center",
flexWrap: "wrap",
}}
>
<img src={image} alt="payment method" />
<Typography sx={{ color: theme.palette.grey3.main }}>{name}</Typography>
</Box>
);
}