c6708b2c1f
* feat: wip rewrite auth * feat: restructure folders and fix stories and tests * feat: remove auth provider and fix tests
15 lines
431 B
TypeScript
15 lines
431 B
TypeScript
import { ThemeProvider } from '@emotion/react';
|
|
|
|
import { darkTheme, lightTheme } from '@/ui/layout/styles/themes';
|
|
import { browserPrefersDarkMode } from '@/utils/utils';
|
|
|
|
type OwnProps = {
|
|
children: JSX.Element;
|
|
};
|
|
|
|
export function AppThemeProvider({ children }: OwnProps) {
|
|
const selectedTheme = browserPrefersDarkMode() ? darkTheme : lightTheme;
|
|
|
|
return <ThemeProvider theme={selectedTheme}>{children}</ThemeProvider>;
|
|
}
|