mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-06 21:03:47 +02:00
feat(theme-common): JSDoc for all APIs (#6974)
* feat(theme-common): JSDoc for all APIs * fix tests
This commit is contained in:
parent
4103fef11e
commit
b456a64f61
48 changed files with 871 additions and 679 deletions
|
@ -9,6 +9,10 @@ import defaultTheme from 'prism-react-renderer/themes/palenight';
|
|||
import {useColorMode} from '../contexts/colorMode';
|
||||
import {useThemeConfig} from '../utils/useThemeConfig';
|
||||
|
||||
/**
|
||||
* Returns a color-mode-dependent Prism theme: whatever the user specified in
|
||||
* the config. Falls back to `palenight`.
|
||||
*/
|
||||
export function usePrismTheme(): typeof defaultTheme {
|
||||
const {prism} = useThemeConfig();
|
||||
const {colorMode} = useColorMode();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue