FrontPastel/node_modules/@mui/private-theming/useTheme/useTheme.js

10 lines
319 B
JavaScript
Raw Normal View History

2024-04-17 13:55:11 +00:00
import * as React from 'react';
import ThemeContext from './ThemeContext';
export default function useTheme() {
const theme = React.useContext(ThemeContext);
if (process.env.NODE_ENV !== 'production') {
// eslint-disable-next-line react-hooks/rules-of-hooks
React.useDebugValue(theme);
}
return theme;
}