Skip to content

Commit 9a6e47b

Browse files
committed
refactor: rm useThemeDictionary
1 parent 20631f4 commit 9a6e47b

File tree

2 files changed

+2
-26
lines changed

2 files changed

+2
-26
lines changed

packages/prism-react-renderer/src/components/highlight.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { InternalHighlightProps } from "../types"
2-
import { useThemeDictionary } from "./useThemeDictionary"
32
import { useGetLineProps } from "./useGetLineProps"
43
import { useGetTokenProps } from "./useGetTokenProps"
54
import { useTokenize } from "./useTokenize"
5+
import themeToDict from "../utils/themeToDict"
66

77
export const Highlight = ({
88
children,
@@ -12,7 +12,7 @@ export const Highlight = ({
1212
prism,
1313
}: InternalHighlightProps) => {
1414
const language = _language.toLowerCase()
15-
const themeDictionary = useThemeDictionary(language, theme)
15+
const themeDictionary = themeToDict(theme, language)
1616
const getLineProps = useGetLineProps(themeDictionary)
1717
const getTokenProps = useGetTokenProps(themeDictionary)
1818
const grammar = prism.languages[language]

packages/prism-react-renderer/src/components/useThemeDictionary.ts

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)