Skip to content
Prev Previous commit
Next Next commit
Updated mui v4 typings
  • Loading branch information
liringlas committed Jul 14, 2020
commit cd2cf02d63a54a36dc910adf23d2ab66dbfce9f5
19 changes: 12 additions & 7 deletions js/flow-typed/material-ui-core-4.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ declare module "@material-ui/styles/withStyles" {
declare module "@material-ui/styles/withTheme" {
import type { AbstractComponent } from "react";

declare export function withTheme<P = {}>(
C: AbstractComponent<P>,
): AbstractComponent<P>;
declare export default function withTheme(
C: AbstractComponent<any>,
): AbstractComponent<any>;
}

declare module "@material-ui/styles/DefaultTheme" {
Expand Down Expand Up @@ -745,6 +745,8 @@ declare module "@material-ui/core/colors" {
}

declare module "@material-ui/core/styles" {
import type { AbstractComponent } from "react";

import typeof _createMuiTheme from "@material-ui/core/styles/createMuiTheme";
import type {
Theme as MuiTheme,
Expand All @@ -769,7 +771,9 @@ declare module "@material-ui/core/styles" {
declare export var MuiThemeProvider: _MuiThemeProvider;
declare export var createMuiTheme: _createMuiTheme;
declare export var withStyles: _withStyles;
declare export var withTheme: _withTheme;
declare export function withTheme(
C: AbstractComponent<any>,
): AbstractComponent<any>;
declare export var createGenerateClassName: _createGenerateClassName;
declare export var jssPreset: _jssPreset;
}
Expand All @@ -782,10 +786,11 @@ declare module "@material-ui/core/styles/withStyles" {
}

declare module "@material-ui/core/styles/withTheme" {
import typeof _withTheme from "@material-ui/styles/withTheme";
import type { AbstractComponent } from "react";

declare export var withTheme: _withTheme;
declare export default withTheme;
declare export default function withTheme(
C: AbstractComponent<any>,
): AbstractComponent<any>;
}

declare module "@material-ui/core/styles/createMuiTheme" {
Expand Down