mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-14 20:00:33 +00:00
17 lines
506 B
JavaScript
17 lines
506 B
JavaScript
import React from 'react';
|
|
import { ThemeProvider, StyleSheetManager } from 'styled-components';
|
|
import rtlcss from 'stylis-rtlcss';
|
|
import { useAppIntlContext } from '../AppIntlProvider';
|
|
|
|
export function DashboardThemeProvider({ children }) {
|
|
const { direction } = useAppIntlContext();
|
|
|
|
return (
|
|
<StyleSheetManager
|
|
{...(direction === 'rtl' ? { stylisPlugins: [rtlcss] } : {})}
|
|
>
|
|
<ThemeProvider theme={{ dir: direction }}>{children}</ThemeProvider>
|
|
</StyleSheetManager>
|
|
);
|
|
}
|