Skip to content

Instantly share code, notes, and snippets.

@alansouzati
Created June 8, 2022 19:14
Show Gist options
  • Save alansouzati/483aac7d44cc9a36c7ad90c1f1fd7856 to your computer and use it in GitHub Desktop.
Save alansouzati/483aac7d44cc9a36c7ad90c1f1fd7856 to your computer and use it in GitHub Desktop.
export const Header = () => {
const theme = useTheme();
const useMobile = useMediaQuery(theme.breakpoints.down(“sm”));
return (
<Box
sx={{
display: “flex”,
alignItems: “center”,
justifyContent: “space-between”,
backgroundColor: “#e3e3e3”,
color: “#444444”,
paddingLeft: useMobile ? 2 : 3,
paddingTop: useMobile ? 2 : 3,
paddingBottom: useMobile ? 2 : 3
}}
>
<div>
<Typography variant={useMobile ? “h6” : “h5”}>
1276 Bouret Dr
</Typography>
<Typography variant={useMobile ? “h6” : “h5”}>
San Jose, CA 95123
</Typography>
</div>
<Box
sx={{
borderTopLeftRadius: useMobile ? “6px” : “12px”,
borderBottomLeftRadius: useMobile ? “6px” : “12px”,
backgroundColor: “#444444”,
padding: useMobile ? 2 : 3,
display: “flex”,
flexDirection: “column”,
alignItems: “center”,
justifyContent: “center”
}}
>
<Typography variant={useMobile ? “body1” : “h6″} color=”white”>
<b>10</b>
</Typography>
<Typography variant=”caption” color=”#CCCCCC” textAlign=”center”>
days to close
</Typography>
</Box>
</Box>
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment