test: improve test coverage; reorder theme-common files (#6956)

* test: improve test coverage; reorder theme-common files

* no need for this
This commit is contained in:
Joshua Chen 2022-03-22 15:33:55 +08:00 committed by GitHub
parent 0a5354dc32
commit 948271a0ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 555 additions and 317 deletions

View file

@ -6,10 +6,10 @@
*/
import defaultTheme from 'prism-react-renderer/themes/palenight';
import {useColorMode} from '../utils/colorModeUtils';
import {useColorMode} from '../contexts/colorMode';
import {useThemeConfig} from '../utils/useThemeConfig';
export default function usePrismTheme(): typeof defaultTheme {
export function usePrismTheme(): typeof defaultTheme {
const {prism} = useThemeConfig();
const {colorMode} = useColorMode();
const lightModeTheme = prism.theme || defaultTheme;