@mui/private-theming
Version:
Private - The React theme context to be shared between `@mui/styles` and `@mui/material`.
13 lines • 608 B
text/typescript
import * as React from 'react';
import type { DefaultTheme } from "../defaultTheme/index.mjs";
export interface ThemeProviderProps<Theme = DefaultTheme> {
children?: React.ReactNode;
theme: Partial<Theme> | ((outerTheme: Theme) => Theme);
}
/**
* This component takes a `theme` prop.
* It makes the `theme` available down the React tree thanks to React context.
* This component should preferably be used at **the root of your component tree**.
*/
declare function ThemeProvider<T = DefaultTheme>(props: ThemeProviderProps<T>): React.ReactElement<ThemeProviderProps<T>>;
export default ThemeProvider;