Theming working
This commit is contained in:
18
src/App.tsx
18
src/App.tsx
@@ -31,15 +31,7 @@ function App() {
|
||||
defaultValue: "blackboard",
|
||||
});
|
||||
|
||||
const [currentTheme, setCurrentTheme] = useState<any>({});
|
||||
|
||||
const overrides = createTheme({
|
||||
white: currentTheme.colorbackground,
|
||||
fontFamily:
|
||||
"-apple-system,Jost,BlinkMacSystemFont,Helvetica Neue,Roboto,sans-serif",
|
||||
});
|
||||
|
||||
const mantineTheme = mergeMantineTheme(DEFAULT_THEME, overrides);
|
||||
const [currentTheme, setCurrentTheme] = useState<any>(undefined);
|
||||
|
||||
useEffect(() => {
|
||||
if (data && themeName) {
|
||||
@@ -60,6 +52,14 @@ function App() {
|
||||
),
|
||||
);
|
||||
|
||||
const overrides = createTheme({
|
||||
white: currentTheme?.colorbackground,
|
||||
fontFamily:
|
||||
"-apple-system,Jost,BlinkMacSystemFont,Helvetica Neue,Roboto,sans-serif",
|
||||
});
|
||||
|
||||
const mantineTheme = mergeMantineTheme(DEFAULT_THEME, overrides);
|
||||
|
||||
return (
|
||||
<MantineProvider theme={mantineTheme}>
|
||||
{currentTheme && (
|
||||
|
||||
Reference in New Issue
Block a user