2022-11-19 12:39:57 +00:00
|
|
|
import { Box, Typography, useMediaQuery, useTheme } from "@mui/material";
|
2022-11-17 12:25:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
interface Props {
|
|
|
|
bigText: string;
|
|
|
|
text: string;
|
|
|
|
flex: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export default function Infographics({ bigText, text, flex }: Props) {
|
|
|
|
const theme = useTheme();
|
2022-11-19 12:39:57 +00:00
|
|
|
const upMd = useMediaQuery(theme.breakpoints.up("md"));
|
2022-11-17 12:25:23 +00:00
|
|
|
|
|
|
|
return (
|
|
|
|
<Box
|
|
|
|
sx={{
|
|
|
|
flex,
|
2023-03-22 15:49:08 +00:00
|
|
|
maxWidth:upMd ? undefined : "120px",
|
2022-11-17 12:25:23 +00:00
|
|
|
}}
|
|
|
|
>
|
|
|
|
<Typography
|
|
|
|
variant="infographic"
|
2022-11-24 19:22:30 +00:00
|
|
|
color={theme.palette.brightPurple.main}
|
2022-11-17 12:25:23 +00:00
|
|
|
sx={{
|
|
|
|
whiteSpace: "nowrap",
|
|
|
|
}}
|
|
|
|
>{bigText}</Typography>
|
2022-11-19 12:39:57 +00:00
|
|
|
<Typography variant={upMd ? "body1" : "body2"} sx={{ maxWidth: "10em", fontWeight: 500 }}>{text}</Typography>
|
2022-11-17 12:25:23 +00:00
|
|
|
</Box>
|
|
|
|
);
|
|
|
|
}
|