theme: explicit type imports from MUI v4
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
committed by
Philipp Hugenroth
parent
d2d90b1d30
commit
139207fe21
@@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
import { createTheme as createV4Theme } from '@material-ui/core/styles';
|
||||
import type {
|
||||
Theme as Mui4Theme,
|
||||
createTheme as createV4Theme,
|
||||
ThemeOptions as ThemeOptionsV4,
|
||||
} from '@material-ui/core/styles';
|
||||
import { PaletteOptions as PaletteOptionsV4 } from '@material-ui/core/styles/createPalette';
|
||||
import type { PaletteOptions as PaletteOptionsV4 } from '@material-ui/core/styles/createPalette';
|
||||
import { PaletteOptions as PaletteOptionsV5 } from '@mui/material/styles/createPalette';
|
||||
import {
|
||||
adaptV4Theme,
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
import React, { ReactNode } from 'react';
|
||||
import {
|
||||
StylesProvider as Mui4StylesProvider,
|
||||
Theme as Mui4Theme,
|
||||
ThemeProvider as Mui4Provider,
|
||||
} from '@material-ui/core/styles';
|
||||
import type { Theme as Mui4Theme } from '@material-ui/core/styles';
|
||||
import {
|
||||
StyledEngineProvider,
|
||||
Theme as Mui5Theme,
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Overrides } from '@material-ui/core/styles/overrides';
|
||||
import { ComponentsProps } from '@material-ui/core/styles/props';
|
||||
import type { Overrides } from '@material-ui/core/styles/overrides';
|
||||
import type { ComponentsProps } from '@material-ui/core/styles/props';
|
||||
import { ComponentsOverrides, Theme, ThemeOptions } from '@mui/material/styles';
|
||||
import { CSSProperties } from 'react';
|
||||
|
||||
|
||||
@@ -16,7 +16,12 @@
|
||||
|
||||
import { Theme as Mui5Theme } from '@mui/material/styles';
|
||||
import { createTheme as createMuiTheme } from '@material-ui/core/styles';
|
||||
import { GridProps, SwitchProps, Theme, ThemeOptions } from '@material-ui/core';
|
||||
import type {
|
||||
GridProps,
|
||||
SwitchProps,
|
||||
Theme,
|
||||
ThemeOptions,
|
||||
} from '@material-ui/core';
|
||||
import { Overrides } from '@material-ui/core/styles/overrides';
|
||||
import { SimpleThemeOptions } from './types';
|
||||
import { createBaseThemeOptions } from '../base';
|
||||
|
||||
@@ -14,10 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Theme, ThemeOptions } from '@material-ui/core';
|
||||
import {
|
||||
PaletteOptions,
|
||||
Palette,
|
||||
import type {
|
||||
Theme as MuiTheme,
|
||||
ThemeOptions as MuiThemeOptions,
|
||||
} from '@material-ui/core';
|
||||
import type {
|
||||
PaletteOptions as MuiPaletteOptions,
|
||||
Palette as MuiPalette,
|
||||
} from '@material-ui/core/styles/createPalette';
|
||||
import {
|
||||
BackstagePaletteAdditions,
|
||||
@@ -32,7 +35,7 @@ import {
|
||||
* @public
|
||||
* @deprecated This type is deprecated, the MUI Palette type is now always extended instead.
|
||||
*/
|
||||
export type BackstagePalette = Palette & BackstagePaletteAdditions;
|
||||
export type BackstagePalette = MuiPalette & BackstagePaletteAdditions;
|
||||
|
||||
/**
|
||||
* The full Backstage palette options.
|
||||
@@ -40,7 +43,7 @@ export type BackstagePalette = Palette & BackstagePaletteAdditions;
|
||||
* @public
|
||||
* @deprecated This type is deprecated, the MUI PaletteOptions type is now always extended instead.
|
||||
*/
|
||||
export type BackstagePaletteOptions = PaletteOptions &
|
||||
export type BackstagePaletteOptions = MuiPaletteOptions &
|
||||
BackstagePaletteAdditions;
|
||||
|
||||
/**
|
||||
@@ -55,7 +58,7 @@ export type BackstagePaletteOptions = PaletteOptions &
|
||||
* {@link BackstageTheme}.
|
||||
*
|
||||
*/
|
||||
export interface BackstageThemeOptions extends ThemeOptions {
|
||||
export interface BackstageThemeOptions extends MuiThemeOptions {
|
||||
palette: BackstagePaletteOptions;
|
||||
page: PageTheme;
|
||||
getPageTheme: (selector: PageThemeSelector) => PageTheme;
|
||||
@@ -67,7 +70,7 @@ export interface BackstageThemeOptions extends ThemeOptions {
|
||||
* @public
|
||||
* @deprecated This type is deprecated, the MUI Theme type is now always extended instead.
|
||||
*/
|
||||
export interface BackstageTheme extends Theme {
|
||||
export interface BackstageTheme extends MuiTheme {
|
||||
palette: BackstagePalette;
|
||||
page: PageTheme;
|
||||
getPageTheme: (selector: PageThemeSelector) => PageTheme;
|
||||
@@ -81,7 +84,7 @@ export interface BackstageTheme extends Theme {
|
||||
* @deprecated Use {@link BaseThemeOptionsInput} instead.
|
||||
*/
|
||||
export type SimpleThemeOptions = {
|
||||
palette: PaletteOptions;
|
||||
palette: MuiPaletteOptions;
|
||||
defaultPageTheme?: string;
|
||||
pageTheme?: Record<string, PageTheme>;
|
||||
fontFamily?: string;
|
||||
|
||||
Reference in New Issue
Block a user