import * as React from 'react'; import { ConsistentWith, Omit, PropInjector } from '@material-ui/types'; import { DefaultTheme } from '../defaultTheme'; export interface WithThemeCreatorOption { defaultTheme?: Theme; } export interface WithTheme { theme: Theme; /** * Deprecated. Will be removed in v5. Refs are now automatically forwarded to * the inner component. * @deprecated since version 4.0 */ innerRef?: React.Ref; } export interface ThemedComponentProps extends Partial { ref?: React.Ref; } export function withThemeCreator( option?: WithThemeCreatorOption ): PropInjector, ThemedComponentProps>; export default function withTheme< Theme, C extends React.ComponentType, WithTheme>> >( component: C ): React.ComponentType< Omit>, keyof WithTheme> & Partial> & ThemedComponentProps >;