front-hub/src/pages/Landing/Infographics.tsx

31 lines
842 B
TypeScript
Raw Normal View History

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,
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>
<Typography variant={upMd ? "body1" : "body2"} sx={{ maxWidth: "11em", fontWeight: 500 }}>{text}</Typography>
2022-11-17 12:25:23 +00:00
</Box>
);
}