Skip to content
9 changes: 9 additions & 0 deletions internal/lookoutui/src/app/NavBar.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@
margin-bottom: 0;
}

.toolbar a.MuiButton-root {
transition: background-color 0.15s ease;
}

.toolbar a.MuiButton-root.active {
background-color: var(--nav-active-bg);
font-weight: bold;
Comment thread
YHines004 marked this conversation as resolved.
}
Comment thread
YHines004 marked this conversation as resolved.

.toolbar .nav-end {
display: flex;
flex-direction: row;
Expand Down
8 changes: 6 additions & 2 deletions internal/lookoutui/src/app/NavBar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { forwardRef } from "react"

import { Settings } from "@mui/icons-material"
import { AppBar, Button, IconButton, Stack, styled, Toolbar, Typography } from "@mui/material"
import { alpha, AppBar, Button, IconButton, Stack, styled, Toolbar, Typography } from "@mui/material"
import { Link, NavLink, NavLinkProps } from "react-router-dom"

import { SPACING } from "../common/spacing"
Expand All @@ -18,17 +18,20 @@ const StyledAppBar = styled(AppBar)(({ theme }) => ({
backgroundColor: theme.palette.appBar.main,
backgroundImage: "unset",
color: theme.palette.appBar.contrastText,
"--nav-active-bg": alpha(theme.palette.appBar.contrastText, 0.33),
}))

interface Page {
title: string
location: string
end?: boolean
}

const PAGES: Page[] = [
{
title: "Jobs",
location: JOBS,
end: true,
},
{
title: "Job Sets",
Expand Down Expand Up @@ -59,14 +62,15 @@ export const NavBar = ({ customTitle }: NavBarProps) => {
</a>
</div>
<Stack direction="row" alignItems="center" spacing={SPACING.sm}>
{PAGES.map(({ location, title }) => (
{PAGES.map(({ location, title, end }) => (
<Button
key={location}
variant="outlined"
color="inherit"
size="large"
component={NavLinkButton}
to={location}
end={end}
>
{title}
</Button>
Expand Down
Loading