Sidebar and messages updates

This commit is contained in:
Darren Clarke 2023-01-11 16:18:56 +01:00
parent 6a0cc58f60
commit 016461b549
No known key found for this signature in database
GPG key ID: E2483E6F82907488
6 changed files with 1193 additions and 634 deletions

View file

@ -1,11 +1,19 @@
import { FC, useState } from "react";
import { Grid } from "@mui/material";
import { Sidebar } from "./Sidebar";
export const Layout = ({ children }) => (
<Grid container direction="row">
<Sidebar open />
<Grid item sx={{ ml: "270px", width: "100%", height: "100vh" }}>
{children}
export const Layout = ({ children }) => {
const [open, setOpen] = useState(true);
return (
<Grid container direction="row">
<Sidebar open={open} setOpen={setOpen} />
<Grid
item
sx={{ ml: open ? "270px" : "100px", width: "100%", height: "100vh" }}
>
{children}
</Grid>
</Grid>
</Grid>
);
);
};