paradiego
This commit is contained in:
1
node_modules/@mui/system/useThemeWithoutDefault/index.d.ts
generated
vendored
Normal file
1
node_modules/@mui/system/useThemeWithoutDefault/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export { default } from './useThemeWithoutDefault';
|
||||
1
node_modules/@mui/system/useThemeWithoutDefault/index.js
generated
vendored
Normal file
1
node_modules/@mui/system/useThemeWithoutDefault/index.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export { default } from "./useThemeWithoutDefault.js";
|
||||
6
node_modules/@mui/system/useThemeWithoutDefault/package.json
generated
vendored
Normal file
6
node_modules/@mui/system/useThemeWithoutDefault/package.json
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"sideEffects": false,
|
||||
"module": "./index.js",
|
||||
"main": "../node/useThemeWithoutDefault/index.js",
|
||||
"types": "./index.d.ts"
|
||||
}
|
||||
1
node_modules/@mui/system/useThemeWithoutDefault/useThemeWithoutDefault.d.ts
generated
vendored
Normal file
1
node_modules/@mui/system/useThemeWithoutDefault/useThemeWithoutDefault.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export default function useThemeWithoutDefault<T = null>(defaultTheme?: T): T;
|
||||
12
node_modules/@mui/system/useThemeWithoutDefault/useThemeWithoutDefault.js
generated
vendored
Normal file
12
node_modules/@mui/system/useThemeWithoutDefault/useThemeWithoutDefault.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
'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;
|
||||
Reference in New Issue
Block a user