front-hub/src/pages/Landing/Infographics.tsx
2022-11-21 20:53:16 +03:00

30 lines
796 B
TypeScript

import { Box, Typography, useMediaQuery, useTheme } from "@mui/material";
interface Props {
bigText: string;
text: string;
flex: string;
}
export default function Infographics({ bigText, text, flex }: Props) {
const theme = useTheme();
const upMd = useMediaQuery(theme.breakpoints.up("md"));
return (
<Box
sx={{
flex,
}}
>
<Typography
variant="infographic"
color={theme.palette.custom.brightPurple.main}
sx={{
whiteSpace: "nowrap",
}}
>{bigText}</Typography>
<Typography variant={upMd ? "body1" : "body2"} sx={{ maxWidth: "10em", fontWeight: 500 }}>{text}</Typography>
</Box>
);
}