Skip to content

Commit

Permalink
refactor: rm useThemeDictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
nlkluth committed Dec 9, 2024
1 parent 20631f4 commit 9a6e47b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 26 deletions.
4 changes: 2 additions & 2 deletions packages/prism-react-renderer/src/components/highlight.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { InternalHighlightProps } from "../types"
import { useThemeDictionary } from "./useThemeDictionary"
import { useGetLineProps } from "./useGetLineProps"
import { useGetTokenProps } from "./useGetTokenProps"
import { useTokenize } from "./useTokenize"
import themeToDict from "../utils/themeToDict"

export const Highlight = ({
children,
Expand All @@ -12,7 +12,7 @@ export const Highlight = ({
prism,
}: InternalHighlightProps) => {
const language = _language.toLowerCase()
const themeDictionary = useThemeDictionary(language, theme)
const themeDictionary = themeToDict(theme, language)
const getLineProps = useGetLineProps(themeDictionary)
const getTokenProps = useGetTokenProps(themeDictionary)
const grammar = prism.languages[language]
Expand Down
24 changes: 0 additions & 24 deletions packages/prism-react-renderer/src/components/useThemeDictionary.ts

This file was deleted.

0 comments on commit 9a6e47b

Please sign in to comment.