Added primary/secondary color selection

Added two new inputs to the options menu: primary and secondary color selectors.
This commit is contained in:
Aimsucks
2022-06-07 16:53:51 +00:00
parent f19b4675ad
commit 901798055b
10 changed files with 153 additions and 7 deletions

View File

@@ -6,12 +6,13 @@ import Head from 'next/head';
import { MantineProvider, ColorScheme, ColorSchemeProvider } from '@mantine/core';
import { NotificationsProvider } from '@mantine/notifications';
import { useHotkeys } from '@mantine/hooks';
import { ConfigProvider } from '../tools/state';
import { ConfigProvider, useConfig } from '../tools/state';
import { theme } from '../tools/theme';
import { styles } from '../tools/styles';
export default function App(props: AppProps & { colorScheme: ColorScheme }) {
const { Component, pageProps } = props;
const { config } = useConfig();
const [colorScheme, setColorScheme] = useState<ColorScheme>(props.colorScheme);
const toggleColorScheme = (value?: ColorScheme) => {
@@ -33,6 +34,7 @@ export default function App(props: AppProps & { colorScheme: ColorScheme }) {
<MantineProvider
theme={{
...theme,
primaryColor: config.settings.primary_color || 'red',
colorScheme,
}}
styles={{