You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
677 B
18 lines
677 B
import React from 'react';
|
|
import { UpdateTheme, ReplaceTheme } from './ThemeProvider';
|
|
import { ThemeMode } from './theme';
|
|
import { Colors } from './colors';
|
|
export interface ThemedComponent {
|
|
displayName: string;
|
|
}
|
|
interface ThemeProps<T = {}> {
|
|
theme?: {
|
|
colors: Colors;
|
|
mode?: ThemeMode;
|
|
} & T;
|
|
updateTheme?: UpdateTheme;
|
|
replaceTheme?: ReplaceTheme;
|
|
}
|
|
declare function withTheme<P = {}, T = {}>(WrappedComponent: React.ComponentType<P & ThemeProps<T>>, themeKey?: string): React.FunctionComponent<React.PropsWithChildren<P>> | React.ForwardRefExoticComponent<React.RefAttributes<React.PropsWithChildren<P>>>;
|
|
export default withTheme;
|