Dynamic style changes (#3544)

* color changes

* dynamic logo

* dynamic favicon

* trailing whitespace

* useLayoutEffect
This commit is contained in:
Nathan Hayfield 2022-08-10 20:04:36 +02:00 committed by GitHub
parent 3c63b6c028
commit f87e138eab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 48 additions and 15 deletions

View file

@ -18,6 +18,7 @@ import styled from "@mui/material/styles/styled";
import { get } from "lodash";
import React, { FC, useState } from "react";
import { ChevronLeft, ChevronRight, Menu as MenuIcon } from "react-feather";
import LogoURL from "../static/logo_white.svg";
const DrawerHeader = styled("div")(({ theme }) => ({
display: "flex",
@ -108,7 +109,7 @@ const Header: FC<HeaderProps> = ({ includeSidebar, data }) => {
</>
) : (
<a href="/.pomerium">
<Logo />
<Logo src={ data?.logoUrl || LogoURL }/>
</a>
)}
<Box flexGrow={1} />

View file

@ -1,9 +1,8 @@
import LogoURL from "../static/logo_white.svg";
import React from "react";
import type { FC } from "react";
const Logo: FC = () => {
return <img alt="Logo" src={LogoURL} height="30px" />;
const Logo: FC<{src: string}> = ({src}) => {
return <img alt="Logo" src={src} height="30px" />;
};
export default Logo;