From f669320ebe4a71a4726452daa1b578642a6b886f Mon Sep 17 00:00:00 2001 From: Sebastian Sebald Date: Thu, 31 Aug 2017 11:36:44 +0200 Subject: [PATCH] [typescript] Adjust typings to refactoring in `styles`. (#7975) --- src/styles/MuiThemeProvider.d.ts | 2 +- src/styles/createMixins.d.ts | 2 +- src/styles/createMuiTheme.d.ts | 8 ++++---- src/styles/createTypography.d.ts | 2 +- src/styles/index.d.ts | 8 ++++---- src/styles/withStyles.d.ts | 2 +- src/styles/withTheme.d.ts | 2 +- test/typescript/styles.spec.tsx | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/styles/MuiThemeProvider.d.ts b/src/styles/MuiThemeProvider.d.ts index 33eb1704374292..03697d205ad430 100644 --- a/src/styles/MuiThemeProvider.d.ts +++ b/src/styles/MuiThemeProvider.d.ts @@ -1,5 +1,5 @@ import * as React from 'react'; -import { Theme } from './theme'; +import { Theme } from './createMuiTheme'; export interface MuiThemeProviderProps { theme?: Theme; diff --git a/src/styles/createMixins.d.ts b/src/styles/createMixins.d.ts index 20f4904d5f2115..0b45058b1392ea 100644 --- a/src/styles/createMixins.d.ts +++ b/src/styles/createMixins.d.ts @@ -1,4 +1,4 @@ -import { Breakpoints } from './breakpoints'; +import { Breakpoints } from './createBreakpoints'; import { Spacing } from './spacing'; export interface Mixins { diff --git a/src/styles/createMuiTheme.d.ts b/src/styles/createMuiTheme.d.ts index 1ff0b454ed275f..c91e70da63ae7f 100644 --- a/src/styles/createMuiTheme.d.ts +++ b/src/styles/createMuiTheme.d.ts @@ -1,10 +1,10 @@ -import { Breakpoints } from './breakpoints'; -import { Mixins } from './mixins'; -import { Palette } from './palette'; +import { Breakpoints } from './createBreakpoints'; +import { Mixins } from './createMixins'; +import { Palette } from './createPalette'; import { Shadows } from './shadows'; import { Spacing } from './spacing'; import { Transitions } from './transitions'; -import { Typography } from './typography'; +import { Typography } from './createTypography'; import { ZIndex } from './zIndex'; export interface ThemeOptions { diff --git a/src/styles/createTypography.d.ts b/src/styles/createTypography.d.ts index 1d5b2a0086f6d3..5e5a1b1b53be23 100644 --- a/src/styles/createTypography.d.ts +++ b/src/styles/createTypography.d.ts @@ -1,4 +1,4 @@ -import { Palette } from './palette'; +import { Palette } from './createPalette'; export type TextStyle = | 'display1' diff --git a/src/styles/index.d.ts b/src/styles/index.d.ts index e543da4732239f..89a6b632704ceb 100644 --- a/src/styles/index.d.ts +++ b/src/styles/index.d.ts @@ -1,8 +1,8 @@ export { default as MuiThemeProvider } from './MuiThemeProvider'; -export { default as createBreakpoints } from './breakpoints'; -export { default as createMuiTheme } from './theme'; -export { default as createPalette } from './palette'; -export { default as createTypography } from './typography'; +export { default as createBreakpoints } from './createBreakpoints'; +export { default as createMuiTheme, Theme } from './createMuiTheme'; +export { default as createPalette } from './createPalette'; +export { default as createTypography } from './createTypography'; export { default as withStyles } from './withStyles'; export { StyleRules, StyleRulesCallback } from './withStyles'; export { default as withTheme } from './withTheme'; diff --git a/src/styles/withStyles.d.ts b/src/styles/withStyles.d.ts index e2954aefc581e8..474cce8e7cd984 100644 --- a/src/styles/withStyles.d.ts +++ b/src/styles/withStyles.d.ts @@ -1,6 +1,6 @@ import * as React from 'react'; import { StyledComponentProps } from '..'; -import { Theme } from './theme'; +import { Theme } from './createMuiTheme'; /** * This is basically the API of JSS. It defines a Map, diff --git a/src/styles/withTheme.d.ts b/src/styles/withTheme.d.ts index c038f3d5bab9da..d14236dc084169 100644 --- a/src/styles/withTheme.d.ts +++ b/src/styles/withTheme.d.ts @@ -1,4 +1,4 @@ -import { Theme } from './theme'; +import { Theme } from './createMuiTheme'; interface withTheme

{ (component: React.ComponentType

): React.ComponentClass

; diff --git a/test/typescript/styles.spec.tsx b/test/typescript/styles.spec.tsx index 5ce9406807285c..aa4924b617b5ea 100644 --- a/test/typescript/styles.spec.tsx +++ b/test/typescript/styles.spec.tsx @@ -4,8 +4,8 @@ import { StyleRules, createMuiTheme, MuiThemeProvider, + Theme, } from '../../src/styles'; -import { Theme } from '../../src/styles/theme'; import Button from '../../src/Button/Button'; const styles = ({ palette, spacing }) => ({