blob: c5e9cbee963d3daeb0f1e6a628e0b6e787b1c3cb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import React from 'react';
import { Global, MantineProvider } from '@mantine/core';
import { Colors } from 'app/styles/theme/colors';
import { styles } from 'app/styles/global';
import { getTheme } from 'app/styles/theme';
function setColorResolver(theme) {
if (!theme.cr) theme.cr = new Colors(theme);
return theme;
}
export function ThemeProvider({ children }) {
return (
<MantineProvider theme={getTheme()}>
<Global styles={(theme) => styles(setColorResolver(theme))} />
{children}
</MantineProvider>
);
}
|