mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-07-01 16:50:12 +08:00
Add Color Mode
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import { ColorModeScript } from "@chakra-ui/react";
|
||||
import { Head, Html, Main, NextScript } from "next/document";
|
||||
import theme from "../styles/Theme";
|
||||
|
||||
export default function Document() {
|
||||
return (
|
||||
@@ -7,6 +9,7 @@ export default function Document() {
|
||||
<link rel="shortcut icon" type="image/png" href="/images/logos/favicon.png" />
|
||||
</Head>
|
||||
<body className="flex h-full flex-col bg-gray-50">
|
||||
<ColorModeScript initialColorMode={theme.config.initialColorMode} />
|
||||
<Main />
|
||||
<NextScript />
|
||||
</body>
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
import { extendTheme, type ThemeConfig } from "@chakra-ui/react";
|
||||
|
||||
const config: ThemeConfig = {
|
||||
initialColorMode: "light",
|
||||
useSystemColorMode: true,
|
||||
};
|
||||
|
||||
const theme = extendTheme({ config });
|
||||
|
||||
export default theme;
|
||||
Reference in New Issue
Block a user