In this PR: - removing rootDir / baseUrl from any tsconfig.json - we need to keep it in tsconfig.spec.json and also specify rootDir in jest.config.ts moduleMapper because of the way nx jest executor works (automatically moving back to root) - we need to explictly specify the depencies to twenty-shared / twenty-emails (built packages) in packages package.json to help nx understand dependencies
22 lines
561 B
TypeScript
22 lines
561 B
TypeScript
import { ThemeProvider as EmotionThemeProvider } from '@emotion/react';
|
|
import { ReactNode } from 'react';
|
|
|
|
import { ThemeContextProvider } from '@ui/theme/provider/ThemeContextProvider';
|
|
|
|
import { ThemeType } from '..';
|
|
|
|
type ThemeProviderProps = {
|
|
theme: ThemeType;
|
|
children: ReactNode;
|
|
};
|
|
|
|
const ThemeProvider = ({ theme, children }: ThemeProviderProps) => {
|
|
return (
|
|
<EmotionThemeProvider theme={theme}>
|
|
<ThemeContextProvider theme={theme}>{children}</ThemeContextProvider>
|
|
</EmotionThemeProvider>
|
|
);
|
|
};
|
|
|
|
export default ThemeProvider;
|