diff options
| author | Justice Almanzar <superdash993@gmail.com> | 2022-12-07 09:33:40 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-07 15:33:40 +0100 |
| commit | 2d08dd8a9c289bcdb6395e8bdf28b6b729946ab1 (patch) | |
| tree | b15d5c06c3dd881bca64d7eee72a9da0c83e503f /src/plugins/shikiCodeblocks/components | |
| parent | 49b45d82624c3c53aa2a0a4f8bd9957fed75abdd (diff) | |
| download | Vencord-2d08dd8a9c289bcdb6395e8bdf28b6b729946ab1.tar.gz Vencord-2d08dd8a9c289bcdb6395e8bdf28b6b729946ab1.tar.bz2 Vencord-2d08dd8a9c289bcdb6395e8bdf28b6b729946ab1.zip | |
Shiki settings preview (#297)
Diffstat (limited to 'src/plugins/shikiCodeblocks/components')
| -rw-r--r-- | src/plugins/shikiCodeblocks/components/Highlighter.tsx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plugins/shikiCodeblocks/components/Highlighter.tsx b/src/plugins/shikiCodeblocks/components/Highlighter.tsx index 6067fd8..d86e772 100644 --- a/src/plugins/shikiCodeblocks/components/Highlighter.tsx +++ b/src/plugins/shikiCodeblocks/components/Highlighter.tsx @@ -42,6 +42,7 @@ export interface HighlighterProps { lang?: string; content: string; isPreview: boolean; + tempSettings?: Record<string, any>; } export const createHighlighter = (props: HighlighterProps) => ( @@ -53,8 +54,13 @@ export const Highlighter = ({ lang, content, isPreview, + tempSettings, }: HighlighterProps) => { - const { tryHljs, useDevIcon, bgOpacity } = useShikiSettings(["tryHljs", "useDevIcon", "bgOpacity"]); + const { + tryHljs, + useDevIcon, + bgOpacity, + } = useShikiSettings(["tryHljs", "useDevIcon", "bgOpacity"], tempSettings); const { id: currentThemeId, theme: currentTheme } = useTheme(); const shikiLang = lang ? resolveLang(lang) : null; |
