diff --git a/src/components/Sidebar/index.js b/src/components/Sidebar/index.js
index 436cb8f..9542e22 100644
--- a/src/components/Sidebar/index.js
+++ b/src/components/Sidebar/index.js
@@ -1,9 +1,23 @@
+import XIcon from '../../assets/icons/X-close-icon';
import styles from './sidebar.module.css';
-export default function Sidebar() {
- return (
-
- );
+export default function Sidebar({ isMobileScreen, isOpen, setOpen }) {
+ if (!isMobileScreen && isOpen) {
+ return (
+
+
+
Plaidware
+
{
+ setOpen(false);
+ }}
+ >
+
+
+
+
+
+ );
+ }
+ return null;
}
diff --git a/src/components/Sidebar/sidebar.module.css b/src/components/Sidebar/sidebar.module.css
index 92a4f36..8ee47cc 100644
--- a/src/components/Sidebar/sidebar.module.css
+++ b/src/components/Sidebar/sidebar.module.css
@@ -2,9 +2,24 @@
grid-column: 1;
background: #2d373c;
min-height: 100vh;
+ min-width: 350px;
padding: 40px;
}
+/* @media only screen and (max-width: 800px) {
+
+} */
+
+.sidebarBrandingHeader {
+ display: flex;
+ justify-content: space-between;
+ align-items: baseline;
+}
+
+.closeIcon {
+ font-size: larger;
+}
+
.sidebarBranding {
font-style: normal;
font-weight: bold;
@@ -12,4 +27,4 @@
line-height: 44px;
color: #ffffff;
-}
\ No newline at end of file
+}
diff --git a/src/components/topbar/index.js b/src/components/topbar/index.js
index 81478ac..db802d2 100644
--- a/src/components/topbar/index.js
+++ b/src/components/topbar/index.js
@@ -1,8 +1,18 @@
-import React from 'react'
-import styles from './topbar.module.css'
+import React from 'react';
+import HamburgerIcon from '../../assets/icons/Hamburger-icon';
+import styles from './topbar.module.css';
-export default function TopBar() {
+export default function TopBar({ isMobileScreen, isSidebarOpen, setSidebarOpen }) {
return (
- search comes here
- )
+
+
{
+ setSidebarOpen(true);
+ }}
+ >
+ {isSidebarOpen ? null : }
+
+
Other icons here
+
+ );
}
diff --git a/src/components/topbar/topbar.module.css b/src/components/topbar/topbar.module.css
index 0592525..ffb2a48 100644
--- a/src/components/topbar/topbar.module.css
+++ b/src/components/topbar/topbar.module.css
@@ -1,5 +1,10 @@
.topBar {
grid-row: 1;
+
padding: 24px 48px;
box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.08);
-}
\ No newline at end of file
+
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
diff --git a/src/hooks/placeholder b/src/hooks/placeholder
deleted file mode 100644
index e69de29..0000000
diff --git a/src/layouts/dashboard/dashboard.module.css b/src/layouts/dashboard/dashboard.module.css
index 21897ac..c771b02 100644
--- a/src/layouts/dashboard/dashboard.module.css
+++ b/src/layouts/dashboard/dashboard.module.css
@@ -1,7 +1,7 @@
.dashboardGrid {
width: 100vw;
display: grid;
- grid-template-columns: 300px auto;
+ grid-template-columns: max-content auto;
}
.mainContent {
@@ -10,7 +10,19 @@
grid-template-rows: 108px 72px auto;
}
+@media only screen and (max-width: 800px) {
+ .dashboardGrid {
+ grid-template-columns: auto;
+ }
+
+ .mainContent {
+ grid-column: 1;
+ grid-template-rows: 50px 50px auto;
+ }
+}
+
.content {
grid-row: 3;
padding: 24px 48px;
+ min-height: 100%;
}
diff --git a/src/layouts/dashboard/index.js b/src/layouts/dashboard/index.js
index e3f196b..e244d1d 100644
--- a/src/layouts/dashboard/index.js
+++ b/src/layouts/dashboard/index.js
@@ -1,15 +1,21 @@
+import { useState } from 'react';
import { Outlet } from 'react-router-dom';
+
import Breadcrumbs from '../../components/breadcrumbs';
import Sidebar from '../../components/Sidebar';
import TopBar from '../../components/topbar';
+import useWindowDimensions from '../../hooks/useWindowDimensions';
import styles from './dashboard.module.css';
export default function Dashboard() {
+ const [sidebarOpen, setSidebarOpen] = useState(true);
+ const { isMobileScreen } = useWindowDimensions();
+
return (