import * as React from 'react'; import { WithTheme } from '../styles/withTheme'; import { ConsistentWith, Overwrite } from '..'; import { Theme } from './createMuiTheme'; import * as CSS from 'csstype'; import * as JSS from 'jss' export interface CSSProperties extends CSS.Properties { // Allow pseudo selectors and media queries [k: string]: CSS.Properties[keyof CSS.Properties] | CSSProperties; } /** * This is basically the API of JSS. It defines a Map, * where * * - the `keys` are the class (names) that will be created * - the `values` are objects that represent CSS rules (`React.CSSProperties`). */ export type StyleRules = Record; export type StyleRulesCallback = ( theme: Theme, ) => StyleRules; export interface StylesCreator { create(theme: Theme, name: string): StyleRules; options: { index: number }; themingEnabled: boolean; } export interface WithStylesOptions extends JSS.CreateStyleSheetOptions { flip?: boolean; withTheme?: boolean; name?: string; } export type ClassNameMap = Record; export type WithStyles = Partial & { classes: ClassNameMap< T extends string ? T : T extends StyleRulesCallback ? K : T extends StyleRules ? K : never >; }; export interface StyledComponentProps { classes?: Partial>; innerRef?: React.Ref | React.RefObject; } export default function withStyles( style: StyleRulesCallback | StyleRules, options?: WithStylesOptions, ): {

>>( component: React.ComponentType

>, ): React.ComponentType>>; };