import { PropInjector, CoerceEmptyInterface } from '@material-ui/types'; import { Theme } from './createMuiTheme'; import { CreateCSSProperties, CSSProperties, ClassNameMap, StyledComponentProps, WithStylesOptions, StyleRules as ActualStyleRules, StyleRulesCallback, Styles, ClassKeyOfStyles, } from 'material-ui-styles-ssr/withStyles'; export { CreateCSSProperties, CSSProperties, ClassNameMap, StyledComponentProps, Styles, WithStylesOptions, StyleRulesCallback, }; /** * Adapter for `StyleRules` from `material-ui-styles-ssr` for backwards compatibility. * Order of generic arguments is just reversed. */ export type StyleRules< ClassKey extends string = string, Props extends object = {} > = ActualStyleRules; export type WithStyles< StylesOrClassKey extends string | Styles = string, IncludeTheme extends boolean | undefined = false > = (IncludeTheme extends true ? { theme: Theme } : {}) & { classes: ClassNameMap>; }; export default function withStyles< ClassKey extends string, Options extends WithStylesOptions = {}, Props extends object = {} >( style: Styles, options?: Options, ): PropInjector< WithStyles, StyledComponentProps & CoerceEmptyInterface >;