Skip to content

Commit

Permalink
feat: Editor breadcrumb link style
Browse files Browse the repository at this point in the history
  • Loading branch information
ianjon3s committed May 24, 2024
1 parent 05f24b6 commit c8547d7
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions editor.planx.uk/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,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)(() => ({
Expand All @@ -60,6 +60,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,
}));
Expand Down Expand Up @@ -103,7 +109,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,
Expand Down Expand Up @@ -131,7 +137,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),
Expand Down Expand Up @@ -203,33 +209,25 @@ const Breadcrumbs: React.FC = () => {

return (
<BreadcrumbsRoot>
<Link
style={{
color: "#fff",
textDecoration: "none",
}}
<BreadcrumbsLink
component={ReactNaviLink}
href={"/"}
prefetch={false}
{...(isStandalone && { target: "_blank" })}
>
Plan✕
</Link>
</BreadcrumbsLink>
{team.slug && (
<>
{" / "}
<Link
style={{
color: "#fff",
textDecoration: "none",
}}
<BreadcrumbsLink
component={ReactNaviLink}
href={`/${team.slug}`}
prefetch={false}
{...(isStandalone && { target: "_blank" })}
>
{team.slug}
</Link>
</BreadcrumbsLink>
</>
)}
{route.data.flow && (
Expand Down

0 comments on commit c8547d7

Please sign in to comment.