2020-09-10 02:54:22 -07:00
|
|
|
import React from "react";
|
2021-01-04 01:17:30 -08:00
|
|
|
import { Box, Grid, useColorModeValue } from "@chakra-ui/react";
|
2020-09-10 02:54:22 -07:00
|
|
|
|
2021-02-10 12:52:00 -08:00
|
|
|
function WardrobePageLayout({ previewAndControls, itemsAndSearch }) {
|
2021-01-04 01:17:30 -08:00
|
|
|
const itemsAndSearchBackground = useColorModeValue("white", "gray.900");
|
|
|
|
|
2020-09-10 02:54:22 -07:00
|
|
|
return (
|
|
|
|
<Box
|
|
|
|
position="absolute"
|
|
|
|
top="0"
|
|
|
|
bottom="0"
|
|
|
|
left="0"
|
|
|
|
right="0"
|
|
|
|
// Create a stacking context, so that our drawers and modals don't fight
|
|
|
|
// with the z-indexes in here!
|
|
|
|
zIndex="0"
|
|
|
|
>
|
|
|
|
<Grid
|
|
|
|
templateAreas={{
|
|
|
|
base: `"previewAndControls"
|
|
|
|
"itemsAndSearch"`,
|
|
|
|
lg: `"previewAndControls itemsAndSearch"`,
|
|
|
|
}}
|
|
|
|
templateRows={{
|
|
|
|
base: "minmax(100px, 45%) minmax(300px, 55%)",
|
|
|
|
lg: "100%",
|
|
|
|
}}
|
|
|
|
templateColumns={{
|
|
|
|
base: "100%",
|
|
|
|
lg: "50% 50%",
|
|
|
|
}}
|
|
|
|
height="100%"
|
|
|
|
width="100%"
|
|
|
|
>
|
2021-02-10 12:52:00 -08:00
|
|
|
<Box gridArea="previewAndControls" bg="gray.900" position="relative">
|
|
|
|
{previewAndControls}
|
2020-09-10 02:54:22 -07:00
|
|
|
</Box>
|
2021-01-04 01:17:30 -08:00
|
|
|
<Box gridArea="itemsAndSearch" bg={itemsAndSearchBackground}>
|
|
|
|
{itemsAndSearch}
|
|
|
|
</Box>
|
2020-09-10 02:54:22 -07:00
|
|
|
</Grid>
|
|
|
|
</Box>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
export default WardrobePageLayout;
|