Spaces:
Sleeping
Sleeping
Download frontend/node_modules/@mui/system/legacy/useThemeWithoutDefault.js from sepidnes/pythonic-rag-FastAPIReact: direct link, hf CLI and curl.
- Browser
- Download file 451 Bytes
-
https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/94e32638a275d46bc1ba62feac204fcaaf313da4/frontend/node_modules/%40mui/system/legacy/useThemeWithoutDefault.js
- Command line
-
hf download hf://spaces/sepidnes/pythonic-rag-FastAPIReact@94e32638a275d46bc1ba62feac204fcaaf313da4/frontend/node_modules/@mui/system/legacy/useThemeWithoutDefault.js
-
curl -L -o useThemeWithoutDefault.js https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/94e32638a275d46bc1ba62feac204fcaaf313da4/frontend/node_modules/%40mui/system/legacy/useThemeWithoutDefault.js
451 Bytes
| 'use client'; | |
| import * as React from 'react'; | |
| import { ThemeContext } from '@mui/styled-engine'; | |
| function isObjectEmpty(obj) { | |
| return Object.keys(obj).length === 0; | |
| } | |
| function useTheme() { | |
| var defaultTheme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; | |
| var contextTheme = React.useContext(ThemeContext); | |
| return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme : contextTheme; | |
| } | |
| export default useTheme; |