initial commit

This commit is contained in:
Zacharias-Brohn
2026-01-14 06:12:55 +01:00
commit d702390660
46 changed files with 21386 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
'use client';
import { createContext, useContext, useState } from 'react';
import { createTheme, MantineProvider } from '@mantine/core';
interface ThemeContextType {
primaryColor: string;
setPrimaryColor: (color: string) => void;
}
const ThemeContext = createContext<ThemeContextType>({
primaryColor: 'blue',
setPrimaryColor: () => {},
});
export const useThemeContext = () => useContext(ThemeContext);
export function DynamicThemeProvider({ children }: { children: React.ReactNode }) {
const [primaryColor, setPrimaryColor] = useState('blue');
const theme = createTheme({
primaryColor,
});
return (
<ThemeContext.Provider value={{ primaryColor, setPrimaryColor }}>
<MantineProvider theme={theme} defaultColorScheme="auto">
{children}
</MantineProvider>
</ThemeContext.Provider>
);
}