GoScrobble/web/node_modules/@material-ui/styles/es/useTheme/useTheme.js

12 lines
316 B
JavaScript
Raw Permalink Normal View History

2022-04-25 02:47:15 +00:00
import 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;
}