mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-28 00:06:53 +01:00
6818a82cd1
* feat: add dark mode theme * fix: feature metrics * fix: add color * styling * fix: add switch * fix: form sidebar * fix: remove console log * fix: add properties * fix: strategy container * feat: feature flag * fix: tests * fix: build * fix: logo * fix: icon * fix: update snapshots * fix: CES operator * fix: typography * fix: input styling * fix: remove initial load * fix: change flag name * fix: refactor to custom hook * fix: remove unused import * fix: dialog headers * fix: use uiConfig flags instead of flags
25 lines
669 B
TypeScript
25 lines
669 B
TypeScript
import React, { FC } from 'react';
|
|
import { CssBaseline, ThemeProvider as MuiThemeProvider } from '@mui/material';
|
|
|
|
import createCache from '@emotion/cache';
|
|
import { CacheProvider } from '@emotion/react';
|
|
import { useThemeMode } from 'hooks/useThemeMode';
|
|
|
|
export const muiCache = createCache({
|
|
key: 'mui',
|
|
prepend: true,
|
|
});
|
|
|
|
export const ThemeProvider: FC = ({ children }) => {
|
|
const { resolveTheme } = useThemeMode();
|
|
|
|
return (
|
|
<CacheProvider value={muiCache}>
|
|
<MuiThemeProvider theme={resolveTheme()}>
|
|
<CssBaseline />
|
|
{children}
|
|
</MuiThemeProvider>
|
|
</CacheProvider>
|
|
);
|
|
};
|