Added dark theme
This commit is contained in:
parent
6d26698b78
commit
bb63827e2a
@ -13,6 +13,7 @@
|
||||
"@nextui-org/react": "^1.0.0-beta.10",
|
||||
"next": "12",
|
||||
"next-seo": "^5.5.0",
|
||||
"next-themes": "^0.2.1",
|
||||
"node-fetch": "^3.2.10",
|
||||
"prop-types": "^15.8.1",
|
||||
"react": "^18.2.0",
|
||||
|
@ -1,13 +1,36 @@
|
||||
import { NextUIProvider } from "@nextui-org/react";
|
||||
import { createTheme, NextUIProvider } from "@nextui-org/react";
|
||||
import { NextSeo } from "next-seo";
|
||||
import { ThemeProvider as NextThemesProvider } from "next-themes";
|
||||
import Head from "next/head";
|
||||
|
||||
import Config from "../config.json";
|
||||
|
||||
import "../styles/globals.css";
|
||||
|
||||
const lightTheme = createTheme({
|
||||
type: "light",
|
||||
theme: {
|
||||
colors: {},
|
||||
},
|
||||
});
|
||||
|
||||
const darkTheme = createTheme({
|
||||
type: "dark",
|
||||
theme: {
|
||||
colors: {},
|
||||
},
|
||||
});
|
||||
|
||||
function MyApp({ Component, pageProps }) {
|
||||
return (
|
||||
<NextThemesProvider
|
||||
storageKey="theme"
|
||||
attribute="class"
|
||||
value={{
|
||||
dark: darkTheme,
|
||||
light: lightTheme,
|
||||
}}
|
||||
>
|
||||
<NextUIProvider>
|
||||
<NextSeo
|
||||
title={Config.name}
|
||||
@ -47,6 +70,7 @@ function MyApp({ Component, pageProps }) {
|
||||
</Head>
|
||||
<Component {...pageProps} />
|
||||
</NextUIProvider>
|
||||
</NextThemesProvider>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -2155,6 +2155,11 @@ next-seo@^5.5.0:
|
||||
resolved "https://registry.yarnpkg.com/next-seo/-/next-seo-5.5.0.tgz#12bdfce60a6ae098f49617357a166c2d44dbc29e"
|
||||
integrity sha512-5ouBHFtx8YrSDW44lj0qIEQ+oMcz6stgoITB+SqHUZbhgizoJsyLmq73gJ0lxtEKpcN8vG2QgRIJfdb8OAPChw==
|
||||
|
||||
next-themes@^0.2.1:
|
||||
version "0.2.1"
|
||||
resolved "https://registry.yarnpkg.com/next-themes/-/next-themes-0.2.1.tgz#0c9f128e847979daf6c67f70b38e6b6567856e45"
|
||||
integrity sha512-B+AKNfYNIzh0vqQQKqQItTS8evEouKD7H5Hj3kmuPERwddR2TxvDSFZuTj6T7Jfn1oyeUyJMydPl1Bkxkh0W7A==
|
||||
|
||||
next@12:
|
||||
version "12.3.1"
|
||||
resolved "https://registry.yarnpkg.com/next/-/next-12.3.1.tgz#127b825ad2207faf869b33393ec8c75fe61e50f1"
|
||||
|
Reference in New Issue
Block a user