From 79c8507ac32c90711f761786dca85464d1a40ec8 Mon Sep 17 00:00:00 2001 From: Ian Jones Date: Thu, 20 Jun 2024 11:55:18 +0100 Subject: [PATCH] feat: Updated editor header styles --- editor.planx.uk/src/components/Header.tsx | 59 ++++++++++++----------- 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/editor.planx.uk/src/components/Header.tsx b/editor.planx.uk/src/components/Header.tsx index 00f9fc66ed..fefadf8f55 100644 --- a/editor.planx.uk/src/components/Header.tsx +++ b/editor.planx.uk/src/components/Header.tsx @@ -19,7 +19,6 @@ import { styled, Theme } from "@mui/material/styles"; import MuiToolbar from "@mui/material/Toolbar"; import Typography from "@mui/material/Typography"; import useMediaQuery from "@mui/material/useMediaQuery"; -import { visuallyHidden } from "@mui/utils"; import { ComponentType as TYPES } from "@opensystemslab/planx-core/types"; import { clearLocalFlow } from "lib/local"; import { capitalize } from "lodash"; @@ -48,8 +47,8 @@ import TestEnvironmentBanner from "./TestEnvironmentBanner"; export const HEADER_HEIGHT = 74; -const Root = styled(AppBar)(() => ({ - color: "#fff", +const Root = styled(AppBar)(({ theme }) => ({ + color: theme.palette.common.white, })); const BreadcrumbsRoot = styled(Box)(() => ({ @@ -60,6 +59,12 @@ const BreadcrumbsRoot = styled(Box)(() => ({ alignItems: "center", })); +const BreadcrumbsLink = styled(Link)(({ theme }) => ({ + color: theme.palette.common.white, + textDecoration: "none", + borderBottom: "1px solid currentColor", +})) as typeof Link; + const StyledToolbar = styled(MuiToolbar)(() => ({ height: HEADER_HEIGHT, })); @@ -103,7 +108,7 @@ const StyledPopover = styled(Popover)(({ theme }) => ({ const StyledPaper = styled(Paper)(({ theme }) => ({ backgroundColor: theme.palette.background.dark, - color: "#fff", + color: theme.palette.common.white, borderRadius: 0, boxShadow: "none", minWidth: 180, @@ -131,7 +136,7 @@ const SkipLink = styled("a")(({ theme }) => ({ width: "100vw", height: HEADER_HEIGHT / 2, backgroundColor: theme.palette.background.dark, - color: "#fff", + color: theme.palette.common.white, textDecoration: "underline", padding: theme.spacing(1), paddingLeft: theme.spacing(3), @@ -203,33 +208,25 @@ const Breadcrumbs: React.FC = () => { return ( - Planâś• - + {team.slug && ( <> {" / "} - {team.slug} - + )} {route.data.flow && ( @@ -467,26 +464,32 @@ const EditorToolbar: React.FC<{ )} - + + {user.firstName[0]} {user.lastName[0]} - - + + Menu +