Remove CSS modules (#6017)
CSS modules were used as a first test for performance optimization. We later found out that Linaria was a better tradeoff. This PR removes what was implemented in CSS modules and also the CSS theme file that was created that was overlapping with the TS theme files.
This commit is contained in:
@ -1,23 +1,16 @@
|
||||
import { ReactNode, useEffect } from 'react';
|
||||
import { ReactNode } from 'react';
|
||||
import { ThemeProvider as EmotionThemeProvider } from '@emotion/react';
|
||||
|
||||
import { ThemeContextProvider } from '@ui/theme/provider/ThemeContextProvider';
|
||||
|
||||
import { ThemeType } from '..';
|
||||
|
||||
import './theme.css';
|
||||
|
||||
type ThemeProviderProps = {
|
||||
theme: ThemeType;
|
||||
children: ReactNode;
|
||||
};
|
||||
|
||||
const ThemeProvider = ({ theme, children }: ThemeProviderProps) => {
|
||||
useEffect(() => {
|
||||
document.documentElement.className =
|
||||
theme.name === 'dark' ? 'dark' : 'light';
|
||||
}, [theme]);
|
||||
|
||||
return (
|
||||
<EmotionThemeProvider theme={theme}>
|
||||
<ThemeContextProvider theme={theme}>{children}</ThemeContextProvider>
|
||||
|
||||
Reference in New Issue
Block a user