sidebar position fixed
This commit is contained in:
parent
1b9d651c19
commit
6f8b36bf87
@ -17,6 +17,7 @@ import {
|
|||||||
SidebarUserObj,
|
SidebarUserObj,
|
||||||
} from "./components/sidebar/SidebarUser";
|
} from "./components/sidebar/SidebarUser";
|
||||||
import MeetingDetails from "./components/meeting-details/MeetingDetails";
|
import MeetingDetails from "./components/meeting-details/MeetingDetails";
|
||||||
|
import { Box } from "@mui/material";
|
||||||
|
|
||||||
const App: React.FC = () => {
|
const App: React.FC = () => {
|
||||||
const [meetingInfoOpen, setMeetingInfoOpen] = useState(false);
|
const [meetingInfoOpen, setMeetingInfoOpen] = useState(false);
|
||||||
@ -49,8 +50,9 @@ const App: React.FC = () => {
|
|||||||
return (
|
return (
|
||||||
<ThemeProvider theme={Theme}>
|
<ThemeProvider theme={Theme}>
|
||||||
<Router>
|
<Router>
|
||||||
<Sidebar users={sidebarUsers} />
|
|
||||||
<Navbar />
|
<Navbar />
|
||||||
|
<Box id="drawer-container" sx={{ display: "flex", height: "100%" }}>
|
||||||
|
<Box sx={{ flexGrow: 1 }}>
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route path="/" element={<Home />} />
|
<Route path="/" element={<Home />} />
|
||||||
<Route
|
<Route
|
||||||
@ -59,6 +61,11 @@ const App: React.FC = () => {
|
|||||||
/>
|
/>
|
||||||
<Route path="/calendar" element={<Calendar />} />
|
<Route path="/calendar" element={<Calendar />} />
|
||||||
</Routes>
|
</Routes>
|
||||||
|
</Box>
|
||||||
|
<Box>
|
||||||
|
<Sidebar users={sidebarUsers} />
|
||||||
|
</Box>
|
||||||
|
</Box>
|
||||||
<MeetingDetails open={meetingInfoOpen} setOpen={setMeetingInfoOpen} />
|
<MeetingDetails open={meetingInfoOpen} setOpen={setMeetingInfoOpen} />
|
||||||
</Router>
|
</Router>
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
|
|||||||
@ -5,7 +5,6 @@ import VideocamIcon from "@mui/icons-material/Videocam";
|
|||||||
import GroupsIcon from "@mui/icons-material/Groups";
|
import GroupsIcon from "@mui/icons-material/Groups";
|
||||||
import ContactInfo from "../../ContactInfo";
|
import ContactInfo from "../../ContactInfo";
|
||||||
import AddIcon from "@mui/icons-material/Add";
|
import AddIcon from "@mui/icons-material/Add";
|
||||||
import { textAlign } from "@mui/system";
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
contactInfo: ContactInfo;
|
contactInfo: ContactInfo;
|
||||||
|
|||||||
@ -1,6 +1,10 @@
|
|||||||
function Meeting(props: any) {
|
interface Props {
|
||||||
return (
|
meetingName: string;
|
||||||
|
meetingTime: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
function Meeting(props: Props) {
|
||||||
|
return (
|
||||||
<div className="row meeting">
|
<div className="row meeting">
|
||||||
<div className="col-12">
|
<div className="col-12">
|
||||||
<div className="row">
|
<div className="row">
|
||||||
@ -12,6 +16,6 @@ function Meeting(props: any) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
}
|
||||||
|
|
||||||
export default Meeting;
|
export default Meeting;
|
||||||
@ -1,7 +1,7 @@
|
|||||||
import PeopleIcon from '@mui/icons-material/People';
|
import PeopleIcon from "@mui/icons-material/People";
|
||||||
import AddIcon from '@mui/icons-material/Add';
|
import AddIcon from "@mui/icons-material/Add";
|
||||||
import PhoneEnabledIcon from '@mui/icons-material/PhoneEnabled';
|
import PhoneEnabledIcon from "@mui/icons-material/PhoneEnabled";
|
||||||
import CircleIcon from '@mui/icons-material/Circle';
|
import CircleIcon from "@mui/icons-material/Circle";
|
||||||
import Button from "@mui/material/Button";
|
import Button from "@mui/material/Button";
|
||||||
import Grid from "@mui/material/Grid";
|
import Grid from "@mui/material/Grid";
|
||||||
|
|
||||||
|
|||||||
@ -1,13 +1,20 @@
|
|||||||
import { Divider, Drawer, List, ListItem, ListSubheader } from "@mui/material";
|
import {
|
||||||
|
Divider,
|
||||||
|
Drawer,
|
||||||
|
List,
|
||||||
|
ListItem,
|
||||||
|
ListSubheader,
|
||||||
|
Toolbar,
|
||||||
|
} from "@mui/material";
|
||||||
import GroupSelect from "./GroupSelect";
|
import GroupSelect from "./GroupSelect";
|
||||||
import SidebarUser, { SidebarUserObj } from "./SidebarUser";
|
import SidebarUser, { SidebarUserObj } from "./SidebarUser";
|
||||||
|
|
||||||
// TODO: toolbar on top of sidebar since it goes under the navbar
|
// TODO: toolbar on top of sidebar since it goes under the navbar
|
||||||
|
|
||||||
const drawerWidth = 240;
|
const drawerWidth = 200;
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
users: SidebarUserObj[],
|
users: SidebarUserObj[];
|
||||||
}
|
}
|
||||||
|
|
||||||
const Sidebar: React.FC<Props> = ({ users }: Props) => {
|
const Sidebar: React.FC<Props> = ({ users }: Props) => {
|
||||||
@ -15,15 +22,14 @@ const Sidebar: React.FC<Props> = ({ users }: Props) => {
|
|||||||
<Drawer
|
<Drawer
|
||||||
sx={{
|
sx={{
|
||||||
width: drawerWidth,
|
width: drawerWidth,
|
||||||
flexShrink: 0,
|
|
||||||
"& .MuiDrawer-paper": {
|
"& .MuiDrawer-paper": {
|
||||||
width: drawerWidth,
|
width: drawerWidth,
|
||||||
boxSizing: "border-box",
|
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
variant="permanent"
|
variant="permanent"
|
||||||
anchor="right"
|
anchor="right"
|
||||||
>
|
>
|
||||||
|
<Toolbar />
|
||||||
<List disablePadding sx={{ height: "80%", overflow: "auto" }}>
|
<List disablePadding sx={{ height: "80%", overflow: "auto" }}>
|
||||||
<ListSubheader disableGutters>
|
<ListSubheader disableGutters>
|
||||||
<GroupSelect />
|
<GroupSelect />
|
||||||
|
|||||||
Reference in New Issue
Block a user