-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the legacy and new theme work together
- Loading branch information
Showing
10 changed files
with
108 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
import type React from "react"; | ||
|
||
import { MuiThemeProvider } from '@material-ui/core/styles'; | ||
import createTheme from './material-ui-theme'; | ||
|
||
const theme = createTheme(); | ||
|
||
|
||
export type Props = { | ||
children: React.ReactNode; | ||
}; | ||
|
||
|
||
export function LegacyThemeProvider(props: Props) { | ||
|
||
const { children } = props; | ||
|
||
return ( | ||
<MuiThemeProvider theme={theme}> | ||
{children} | ||
</MuiThemeProvider> | ||
); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
import React, { Suspense, lazy } from 'react'; | ||
import Loader from 'js/components/commons/loader'; | ||
import { LegacyThemeProvider } from "js/components/LegacyThemeProvider"; | ||
const OngletContent = lazy(() => import('./details-service')); | ||
|
||
const AsyncDetailsService = (props) => ( | ||
<Suspense fallback={<Loader em={18} />}> | ||
<OngletContent {...props} /> | ||
</Suspense> | ||
<LegacyThemeProvider> | ||
<Suspense fallback={<Loader em={18} />}> | ||
<OngletContent {...props} /> | ||
</Suspense> | ||
</LegacyThemeProvider> | ||
); | ||
|
||
export default AsyncDetailsService; |
Oops, something went wrong.