Merge pull request #92 from bluewave-labs/feat/dashboard-sidebar
Implemented the sidebar component
This commit is contained in:
5 files changed
+101
-32
No files matched your search
@@ -1,15 +1,20 @@
|
|||||||
|
.dashboard-menu-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
.icon-container {
|
.icon-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-container {
|
.text-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dashboard-menu-text {
|
.dashboard-menu-text {
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
.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;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 20px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-container {
|
||||||
|
margin-top: 60px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.support-container {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 10px 20px;
|
||||||
|
margin-bottom: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.support-text {
|
||||||
|
margin-left: 8px;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
import DashboardMenu from '../../Components/DashboardMenu';
|
||||||
|
import SupportIcon from '@mui/icons-material/Support';
|
||||||
|
import SvgIcon from '@mui/material/SvgIcon';
|
||||||
|
import './index.css';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @component
|
||||||
|
* DashboardSidebar component serves as a sidebar containing the DashboardMenu and a Support icon at the bottom.
|
||||||
|
*
|
||||||
|
* @returns {JSX.Element} The JSX element representing the DashboardSidebar component.
|
||||||
|
*/
|
||||||
|
|
||||||
|
function DashboardSidebar() {
|
||||||
|
return (
|
||||||
|
<div className="dashboard-sidebar">
|
||||||
|
<div className="menu-container">
|
||||||
|
<DashboardMenu />
|
||||||
|
</div>
|
||||||
|
<div className="support-container">
|
||||||
|
<SvgIcon component={SupportIcon} />
|
||||||
|
<span className="support-text">Support</span>
|
||||||
|
</div>
|
||||||
|
</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 NavBar from '../../Components/NavBar';
|
||||||
import { Outlet } from 'react-router'
|
import { Outlet } from 'react-router';
|
||||||
import Home from '../../Pages/Home'
|
import DashboardSidebar from '../../Components/DashboardSidebar';
|
||||||
import './index.css'
|
import './index.css';
|
||||||
import ChartsOverviewDemo from '../../Components/DashboardProgressBars'
|
|
||||||
import DashboardSettings from '../../Components/DashboardSettingsIcon'
|
|
||||||
|
|
||||||
|
|
||||||
const HomeLayout = () => {
|
const HomeLayout = () => {
|
||||||
return (
|
return (
|
||||||
<>
|
<div className="home-layout">
|
||||||
<NavBar />
|
<DashboardSidebar />
|
||||||
<Home />
|
<div className="main-content">
|
||||||
<Outlet />
|
<NavBar />
|
||||||
<ChartsOverviewDemo />
|
</div>
|
||||||
<DashboardSettings />
|
</div>
|
||||||
</>
|
);
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default HomeLayout
|
export default HomeLayout;
|
||||||
Reference in new issue
Block a user