2025-03-04 12:06:33 +00:00
|
|
|
import { useTheme } from "next-themes";
|
2025-03-04 12:53:19 +00:00
|
|
|
import { MonacoTheme } from "@/types/monaco-theme";
|
2025-03-04 12:06:33 +00:00
|
|
|
import { MonacoThemeConfig } from "@/config/monaco-theme";
|
|
|
|
|
|
|
|
export function useMonacoTheme() {
|
|
|
|
const { resolvedTheme } = useTheme();
|
|
|
|
|
2025-03-19 06:58:11 +00:00
|
|
|
const currentTheme = resolvedTheme === "light" ? MonacoThemeConfig[MonacoTheme.GitHubLightDefault] : MonacoThemeConfig[MonacoTheme.GitHubDarkDefault];
|
2025-03-04 12:06:33 +00:00
|
|
|
|
|
|
|
return {
|
2025-03-19 06:58:11 +00:00
|
|
|
currentTheme,
|
2025-03-04 12:06:33 +00:00
|
|
|
};
|
|
|
|
}
|