mirror of
https://github.com/cfngc4594/monaco-editor-lsp-next.git
synced 2025-05-18 15:26:36 +00:00
fix(useMonacoTheme): return theme ID instead of the full theme object
This commit is contained in:
parent
783b8415ea
commit
458bdfbf42
@ -56,7 +56,7 @@ export default function MdxPreview({ source }: MdxPreviewProps) {
|
||||
[
|
||||
rehypePretty,
|
||||
{
|
||||
theme: currentTheme.id,
|
||||
theme: currentTheme,
|
||||
keepBackground: false,
|
||||
},
|
||||
],
|
||||
|
@ -5,7 +5,7 @@ import { MonacoThemeConfig } from "@/config/monaco-theme";
|
||||
export function useMonacoTheme() {
|
||||
const { resolvedTheme } = useTheme();
|
||||
|
||||
const currentTheme = resolvedTheme === "light" ? MonacoThemeConfig[MonacoTheme.GitHubLightDefault] : MonacoThemeConfig[MonacoTheme.GitHubDarkDefault];
|
||||
const currentTheme = resolvedTheme === "light" ? MonacoThemeConfig[MonacoTheme.GitHubLightDefault].id : MonacoThemeConfig[MonacoTheme.GitHubDarkDefault].id;
|
||||
|
||||
return {
|
||||
currentTheme,
|
||||
|
Loading…
Reference in New Issue
Block a user