Updated: Organised dashboard modules
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import styles from './dashboard.module.css';
|
||||
import styles from './sidebar.module.css';
|
||||
|
||||
export default function Sidebar() {
|
||||
return (
|
||||
15
src/components/Sidebar/sidebar.module.css
Normal file
15
src/components/Sidebar/sidebar.module.css
Normal file
@@ -0,0 +1,15 @@
|
||||
.navSidebar {
|
||||
grid-column: 1;
|
||||
background: #2d373c;
|
||||
min-height: 100vh;
|
||||
padding: 40px;
|
||||
}
|
||||
|
||||
.sidebarBranding {
|
||||
font-style: normal;
|
||||
font-weight: bold;
|
||||
font-size: 36px;
|
||||
line-height: 44px;
|
||||
|
||||
color: #ffffff;
|
||||
}
|
||||
4
src/components/breadcrumbs/breadcrumbs.module.css
Normal file
4
src/components/breadcrumbs/breadcrumbs.module.css
Normal file
@@ -0,0 +1,4 @@
|
||||
.breadcrumbs {
|
||||
grid-row: 2;
|
||||
padding: 25px 48px;
|
||||
}
|
||||
10
src/components/breadcrumbs/index.js
Normal file
10
src/components/breadcrumbs/index.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import styles from './breadcrumbs.module.css';
|
||||
import React from 'react';
|
||||
|
||||
export default function Breadcrumbs() {
|
||||
return (
|
||||
<div className={styles.breadcrumbs}>
|
||||
breadcrumbs {'>'} are {'>'} here
|
||||
</div>
|
||||
);
|
||||
}
|
||||
8
src/components/topbar/index.js
Normal file
8
src/components/topbar/index.js
Normal file
@@ -0,0 +1,8 @@
|
||||
import React from 'react'
|
||||
import styles from './topbar.module.css'
|
||||
|
||||
export default function TopBar() {
|
||||
return (
|
||||
<div className={styles.topBar}>search comes here</div>
|
||||
)
|
||||
}
|
||||
5
src/components/topbar/topbar.module.css
Normal file
5
src/components/topbar/topbar.module.css
Normal file
@@ -0,0 +1,5 @@
|
||||
.topBar {
|
||||
grid-row: 1;
|
||||
padding: 24px 48px;
|
||||
box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
@@ -4,39 +4,12 @@
|
||||
grid-template-columns: 300px auto;
|
||||
}
|
||||
|
||||
.navSidebar {
|
||||
grid-column: 1;
|
||||
background: #2d373c;
|
||||
min-height: 100vh;
|
||||
padding: 40px;
|
||||
}
|
||||
|
||||
.sidebarBranding {
|
||||
font-style: normal;
|
||||
font-weight: bold;
|
||||
font-size: 36px;
|
||||
line-height: 44px;
|
||||
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.mainContent {
|
||||
grid-column: 2;
|
||||
display: grid;
|
||||
grid-template-rows: 108px 72px auto;
|
||||
}
|
||||
|
||||
.topBar {
|
||||
grid-row: 1;
|
||||
padding: 24px 48px;
|
||||
box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
.breadcrumbs {
|
||||
grid-row: 2;
|
||||
padding: 25px 48px;
|
||||
}
|
||||
|
||||
.content {
|
||||
grid-row: 3;
|
||||
padding: 24px 48px;
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import { Outlet } from 'react-router-dom';
|
||||
import Breadcrumbs from '../../components/breadcrumbs';
|
||||
import Sidebar from '../../components/Sidebar';
|
||||
import TopBar from '../../components/topbar';
|
||||
import styles from './dashboard.module.css';
|
||||
import Sidebar from './Sidebar';
|
||||
|
||||
export default function Dashboard() {
|
||||
return (
|
||||
<div className={styles.dashboardGrid}>
|
||||
<Sidebar />
|
||||
<div className={styles.mainContent}>
|
||||
<div className={styles.topBar}>search comes here</div>
|
||||
<div className={styles.breadcrumbs}>
|
||||
breadcrumbs {'>'} are {'>'} here
|
||||
</div>
|
||||
<TopBar />
|
||||
<Breadcrumbs />
|
||||
<div className={styles.content}>
|
||||
<Outlet />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user