13 lines
608 B
TypeScript
13 lines
608 B
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; |