mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
feat: typeing AppIntlProvider
This commit is contained in:
@@ -1,9 +1,20 @@
|
||||
// @ts-nocheck
|
||||
import React from 'react';
|
||||
import { ThemeProvider, StyleSheetManager } from 'styled-components';
|
||||
import {
|
||||
ThemeProvider as StyleComponentsThemeProvider,
|
||||
StyleSheetManager,
|
||||
} from 'styled-components';
|
||||
import rtlcss from 'stylis-rtlcss';
|
||||
import {
|
||||
defaultTheme,
|
||||
ThemeProvider as XStyledEmotionThemeProvider,
|
||||
} from '@xstyled/emotion';
|
||||
import { useAppIntlContext } from '../AppIntlProvider';
|
||||
|
||||
const theme = {
|
||||
...defaultTheme,
|
||||
bpPrefix: 'bp4',
|
||||
};
|
||||
|
||||
interface DashboardThemeProviderProps {
|
||||
children: React.ReactNode;
|
||||
}
|
||||
@@ -17,7 +28,11 @@ export function DashboardThemeProvider({
|
||||
<StyleSheetManager
|
||||
{...(direction === 'rtl' ? { stylisPlugins: [rtlcss] } : {})}
|
||||
>
|
||||
<ThemeProvider theme={{ dir: direction }}>{children}</ThemeProvider>
|
||||
<StyleComponentsThemeProvider theme={{ dir: direction }}>
|
||||
<XStyledEmotionThemeProvider theme={theme}>
|
||||
{children}
|
||||
</XStyledEmotionThemeProvider>
|
||||
</StyleComponentsThemeProvider>
|
||||
</StyleSheetManager>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user