Update Appbar with a new logo

This commit is contained in:
Ken Hibino
2021-04-19 06:56:00 -07:00
parent 948d0c761a
commit 72bcbadf72
9 changed files with 41 additions and 41 deletions

View File

@@ -3,6 +3,7 @@ import { useTheme, Theme } from "@material-ui/core/styles";
import ReactSyntaxHighlighter from "react-syntax-highlighter";
import styleDark from "react-syntax-highlighter/dist/esm/styles/hljs/atom-one-dark";
import styleLight from "react-syntax-highlighter/dist/esm/styles/hljs/atom-one-light";
import { isDarkTheme } from "../theme";
interface Props {
language: string;
@@ -13,7 +14,7 @@ interface Props {
// Theme aware syntax-highlighter component.
export default function SyntaxHighlighter(props: Props) {
const theme = useTheme<Theme>();
const style = theme.palette.type === "dark" ? styleDark : styleLight;
const style = isDarkTheme(theme) ? styleDark : styleLight;
return (
<ReactSyntaxHighlighter
language={props.language}