Implemented the sidebar component and added it to the home layout screen.
This commit is contained in:
1 parent
5420bcb12d
commit
f2a03c148b
5 files changed
+75
-32
No files matched your search
@@ -1,15 +1,20 @@
|
||||
.dashboard-menu-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.icon-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.text-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.dashboard-menu-text {
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.text-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.dashboard-menu-text {
|
||||
margin-left: 8px;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
.dashboard-sidebar {
|
||||
height: 100vh;
|
||||
width: 250px;
|
||||
background-color: #f4f4f4;
|
||||
box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-top: 60px;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
import DashboardMenu from '../../Components/DashboardMenu';
|
||||
import './index.css';
|
||||
|
||||
/**
|
||||
* @component
|
||||
* DashboardSidebar component serves as a sidebar containing the DashboardMenu.
|
||||
*
|
||||
* @returns {JSX.Element} The JSX element representing the DashboardSidebar component.
|
||||
*/
|
||||
|
||||
function DashboardSidebar() {
|
||||
return (
|
||||
<div className="dashboard-sidebar">
|
||||
<DashboardMenu />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default DashboardSidebar;
|
||||
@@ -1 +1,11 @@
|
||||
/*Homelayout styles*/
|
||||
.home-layout {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
margin-left: 250px;
|
||||
flex: 1;
|
||||
padding: 20px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
@@ -1,21 +1,17 @@
|
||||
import NavBar from '../../Components/NavBar'
|
||||
import { Outlet } from 'react-router'
|
||||
import Home from '../../Pages/Home'
|
||||
import './index.css'
|
||||
import ChartsOverviewDemo from '../../Components/DashboardProgressBars'
|
||||
import DashboardSettings from '../../Components/DashboardSettingsIcon'
|
||||
|
||||
import NavBar from '../../Components/NavBar';
|
||||
import { Outlet } from 'react-router';
|
||||
import DashboardSidebar from '../../Components/DashboardSidebar';
|
||||
import './index.css';
|
||||
|
||||
const HomeLayout = () => {
|
||||
return (
|
||||
<>
|
||||
<NavBar />
|
||||
<Home />
|
||||
<Outlet />
|
||||
<ChartsOverviewDemo />
|
||||
<DashboardSettings />
|
||||
</>
|
||||
)
|
||||
return (
|
||||
<div className="home-layout">
|
||||
<DashboardSidebar />
|
||||
<div className="main-content">
|
||||
<NavBar />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default HomeLayout
|
||||
export default HomeLayout;
|
||||
Reference in new issue
Block a user