UNPKG

577 BJavaScriptView Raw
1'use client';
2
3import * as React from 'react';
4import { useTheme as useThemeSystem } from '@mui/system';
5import defaultTheme from "./defaultTheme.js";
6import THEME_ID from "./identifier.js";
7export default function useTheme() {
8 const theme = useThemeSystem(defaultTheme);
9 if (process.env.NODE_ENV !== 'production') {
10 // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler
11 // eslint-disable-next-line react-hooks/rules-of-hooks
12 React.useDebugValue(theme);
13 }
14 return theme[THEME_ID] || theme;
15}
\No newline at end of file