From bb63827e2aa3b1f9dc73ff207e0f2cd02e9a1f61 Mon Sep 17 00:00:00 2001 From: Liam <67254223+RealFascinated@users.noreply.github.com> Date: Wed, 19 Oct 2022 15:53:00 +0100 Subject: [PATCH] Added dark theme --- package.json | 1 + pages/_app.js | 100 +++++++++++++++++++++++++++++++------------------- yarn.lock | 5 +++ 3 files changed, 68 insertions(+), 38 deletions(-) diff --git a/package.json b/package.json index 094f145..9c87850 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/pages/_app.js b/pages/_app.js index 1bea1d5..82ed463 100644 --- a/pages/_app.js +++ b/pages/_app.js @@ -1,52 +1,76 @@ -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 ( - - - - - - + + - - - - - + + + + + + + + + + ); } diff --git a/yarn.lock b/yarn.lock index f0b5dc2..13198f1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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"