From 6ae13d86033bfff5cb5d6d009af9bb8da2feea9c Mon Sep 17 00:00:00 2001 From: Taryn Martin Date: Wed, 3 Nov 2021 14:03:31 -0600 Subject: [PATCH] Fix layout for nav bars --- dashboard/src/App.scss | 12 +++++++----- dashboard/src/App.tsx | 5 ++--- .../components/Navigation/LeftBar/LeftNavBar.scss | 3 --- .../src/components/Navigation/TopBar/TopNavBar.scss | 4 +++- .../src/components/Navigation/TopBar/TopNavBar.tsx | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/dashboard/src/App.scss b/dashboard/src/App.scss index 5d8ce5f0..a19b65d2 100644 --- a/dashboard/src/App.scss +++ b/dashboard/src/App.scss @@ -1,14 +1,16 @@ @import "~bootstrap/scss/bootstrap.scss"; .App { - display: flex; - flex-direction: row; - flex-wrap: wrap; - gap: 1rem; + display: grid; + grid-template-columns: 1fr 6fr; + grid-gap: 1rem; width: 100vw; height: 100vh; + .left-nav-bar { + grid-column: 1; + } .app-content { - width: auto; + grid-column: 2; } } diff --git a/dashboard/src/App.tsx b/dashboard/src/App.tsx index 8c3aca4d..ddcc026e 100644 --- a/dashboard/src/App.tsx +++ b/dashboard/src/App.tsx @@ -3,7 +3,6 @@ import data from './data.json'; import LeftNavBar from './components/Navigation/LeftBar/LeftNavBar'; import TopNavBar from './components/Navigation/TopBar/TopNavBar'; import './App.scss'; -// import './App.react.scss'; function App() { const [pageDisplay, setPageDisplay] = useState('dashboard'); @@ -26,10 +25,10 @@ function App() {
{pageDisplay === 'dashboard' && ( -

Polaris Dashboard

+

Polaris Dashboard

)} {pageDisplay === 'namespaces' && ( -

{selectedNamespace} Namespace

+

{selectedNamespace} Namespace

)}
diff --git a/dashboard/src/components/Navigation/LeftBar/LeftNavBar.scss b/dashboard/src/components/Navigation/LeftBar/LeftNavBar.scss index d369bfc5..4fe4c596 100644 --- a/dashboard/src/components/Navigation/LeftBar/LeftNavBar.scss +++ b/dashboard/src/components/Navigation/LeftBar/LeftNavBar.scss @@ -4,8 +4,6 @@ justify-content: space-between; background-color: #23103a; color: white; - min-width: 15vw; - // width: 10%; height: 100vh; padding: 1rem; @@ -28,7 +26,6 @@ flex-wrap: wrap; align-items: center; gap: 1rem; - // margin-bottom: 1rem; text-decoration: none; .link-name { diff --git a/dashboard/src/components/Navigation/TopBar/TopNavBar.scss b/dashboard/src/components/Navigation/TopBar/TopNavBar.scss index f9b82bad..80109e68 100644 --- a/dashboard/src/components/Navigation/TopBar/TopNavBar.scss +++ b/dashboard/src/components/Navigation/TopBar/TopNavBar.scss @@ -1,15 +1,16 @@ .top-nav-bar { - width: auto; z-index: 3; background-color: white; height: 3rem; position: sticky; top: 0; + padding-bottom: 0 !important; .top-nav { padding: 0 24px; height: inherit; align-content: end; + width: 100%; .nav-item > .dropdown-menu { max-height: 15rem; @@ -28,6 +29,7 @@ margin-bottom: -2px; border-bottom: 2px solid #445688; color: #445688; + padding-bottom: 14px; } } diff --git a/dashboard/src/components/Navigation/TopBar/TopNavBar.tsx b/dashboard/src/components/Navigation/TopBar/TopNavBar.tsx index 54206341..548058f5 100644 --- a/dashboard/src/components/Navigation/TopBar/TopNavBar.tsx +++ b/dashboard/src/components/Navigation/TopBar/TopNavBar.tsx @@ -1,5 +1,5 @@ import React, { useState } from 'react'; -import { Nav, NavDropdown } from 'react-bootstrap'; +import { Nav, Navbar, NavDropdown } from 'react-bootstrap'; import './TopNavBar.scss'; type NavProps = { @@ -37,7 +37,7 @@ const TopNavBar = ({ pageDisplay, setPageDisplay, namespaces, setSelected }: Nav }; return ( -
+ -
+ ) }