Skip to content

Commit

Permalink
Use sx props for styling
Browse files Browse the repository at this point in the history
Fix typo for overflow from hidden to auto
  • Loading branch information
jenny-alexander committed Sep 27, 2023
1 parent 1f0824d commit fcdb666
Showing 1 changed file with 5 additions and 21 deletions.
26 changes: 5 additions & 21 deletions client/src/components/FoodSeeker/SearchResults/layouts/Tablet.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,14 @@
import React from "react";
import makeStyles from "@mui/styles/makeStyles";

const useStyles = makeStyles((theme) => ({
container: {
height: "100%",
overflow: "hidden",
},
map: {
height: "50%",
},
list: {
height: "50%",
overflow: "auto",
},
}));
import { Box } from "@mui/material";

const TabletLayout = ({ filters, list, map }) => {
const classes = useStyles();

return (
<>
{filters}
<div className={classes.container}>
<div className={classes.map}>{map}</div>
<div className={classes.list}>{list}</div>
</div>
<Box sx={{ height: "100%", overflow: "hidden"}}>
<Box sx={{ height: "50%"}}>{map}</Box>
<Box sx={{ height: "50%", overflow: "auto" }}>{list}</Box>
</Box>
</>
);
};
Expand Down

0 comments on commit fcdb666

Please sign in to comment.