Add support for dark mode

This commit is contained in:
Nilay Majorwar
2021-12-17 20:07:12 +05:30
parent f060b1bac9
commit 0f3664eb63
8 changed files with 127 additions and 3 deletions

View File

@ -4,9 +4,14 @@ import "@blueprintjs/core/lib/css/blueprint.css";
import "@blueprintjs/icons/lib/css/blueprint-icons.css";
import "react-mosaic-component/react-mosaic-component.css";
import type { AppProps } from "next/app";
import { DarkModeProvider } from "../ui/providers/dark-mode-provider";
function MyApp({ Component, pageProps }: AppProps) {
return <Component {...pageProps} />;
return (
<DarkModeProvider>
<Component {...pageProps} />
</DarkModeProvider>
);
}
export default MyApp;

View File

@ -2,6 +2,7 @@ import React from "react";
import { NextPage } from "next";
import { Mainframe } from "../ui/Mainframe";
import Head from "next/head";
import { Header } from "../ui/header";
const Index: NextPage = () => {
return (
@ -9,7 +10,12 @@ const Index: NextPage = () => {
<Head>
<title>Esolang Park</title>
</Head>
<Mainframe />
<div style={{ height: "100%", display: "flex", flexDirection: "column" }}>
<Header />
<div style={{ flexGrow: 1 }}>
<Mainframe />
</div>
</div>
</>
);
};