Spaces:
Sleeping
Sleeping
Download frontend/node_modules/@mui/system/esm/useThemeWithoutDefault.js from sepidnes/pythonic-rag-FastAPIReact: direct link, hf CLI and curl.
- Browser
- Download file 377 Bytes
-
https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/56fda741e84da791ee2e6198479f1d5630989f6c/frontend/node_modules/%40mui/system/esm/useThemeWithoutDefault.js
- Command line
-
hf download hf://spaces/sepidnes/pythonic-rag-FastAPIReact@56fda741e84da791ee2e6198479f1d5630989f6c/frontend/node_modules/@mui/system/esm/useThemeWithoutDefault.js
-
curl -L -o useThemeWithoutDefault.js https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/56fda741e84da791ee2e6198479f1d5630989f6c/frontend/node_modules/%40mui/system/esm/useThemeWithoutDefault.js
377 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(defaultTheme = null) { | |
| const contextTheme = React.useContext(ThemeContext); | |
| return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme : contextTheme; | |
| } | |
| export default useTheme; |