1 |
|
2 |
|
3 | import * as React from 'react';
|
4 | import { Theme } from "./@emotion-react-types-index";
|
5 | import { DistributiveOmit, PropsOf } from "./@emotion-react-types-helper";
|
6 | export interface ThemeProviderProps {
|
7 | theme: Partial<Theme> | ((outerTheme: Theme) => Theme);
|
8 | children?: React.ReactNode;
|
9 | }
|
10 | export interface ThemeProvider {
|
11 | (props: ThemeProviderProps): React.ReactElement;
|
12 | }
|
13 | export type withTheme = <C extends React.ComponentType<React.ComponentProps<C>>>(component: C) => React.FC<DistributiveOmit<PropsOf<C>, 'theme'> & {
|
14 | theme?: Theme;
|
15 | }>;
|
16 | export function useTheme(): Theme;
|
17 | export const ThemeProvider: ThemeProvider;
|
18 | export const withTheme: withTheme;
|
19 | export type WithTheme<P, T> = P extends {
|
20 | theme: infer Theme;
|
21 | } ? P & {
|
22 | theme: Exclude<Theme, undefined>;
|
23 | } : P & {
|
24 | theme: T;
|
25 | }; |
\ | No newline at end of file |