File tree 2 files changed +4
-4
lines changed
packages/docusaurus-theme-redoc/src/theme
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 3
3
usePluginData ,
4
4
useAllPluginInstancesData ,
5
5
} from '@docusaurus/useGlobalData' ;
6
- import useThemeContext from '@theme/hooks/useThemeContext ' ;
6
+ import { useColorMode } from '@docusaurus/theme-common ' ;
7
7
import clsx from 'clsx' ;
8
8
import { ThemeProvider } from 'styled-components' ;
9
9
import { SchemaDefinition , AppStore } from 'redoc' ;
@@ -17,7 +17,7 @@ const ApiSchema: React.FC<Props> = ({
17
17
pointer,
18
18
...rest
19
19
} : Props ) : JSX . Element => {
20
- const { isDarkTheme } = useThemeContext ( ) ;
20
+ const { isDarkTheme } = useColorMode ( ) ;
21
21
const allData = useAllPluginInstancesData < Spec > ( 'docusaurus-plugin-redoc' ) ;
22
22
const { lightTheme, darkTheme, redocOptions } = usePluginData < GlobalData > (
23
23
'docusaurus-theme-redoc' ,
Original file line number Diff line number Diff line change 1
1
import React , { useMemo } from 'react' ;
2
2
import { usePluginData } from '@docusaurus/useGlobalData' ;
3
- import useThemeContext from '@theme/hooks/useThemeContext ' ;
3
+ import { useColorMode } from '@docusaurus/theme-common ' ;
4
4
import { Redoc as RedocComponent , RedocStandalone , AppStore } from 'redoc' ;
5
5
import { RedocProps as Props , GlobalData } from '../../types/common' ;
6
6
import './styles.css' ;
@@ -12,7 +12,7 @@ import './styles.css';
12
12
* Released under the MIT License
13
13
*/
14
14
function Redoc ( props : Props ) : JSX . Element {
15
- const { isDarkTheme } = useThemeContext ( ) ;
15
+ const { isDarkTheme } = useColorMode ( ) ;
16
16
const { lightTheme, darkTheme, redocOptions } = usePluginData < GlobalData > (
17
17
'docusaurus-theme-redoc' ,
18
18
) ;
You can’t perform that action at this time.
0 commit comments