chore(material-ui): Don't use top level material-ui imports
This changes the @material-ui imports to not use top level imports in packages/ as per eslint-rules enforced elsewhere. Signed-off-by: Łukasz Jernaś <lukasz.jernas@allegro.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/theme': patch
|
||||
---
|
||||
|
||||
Don't use top level @material-ui imports
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { makeStyles } from '@material-ui/core';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
|
||||
const useStyles = makeStyles({
|
||||
svg: {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import React, { PropsWithChildren } from 'react';
|
||||
import { makeStyles } from '@material-ui/core';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import HomeIcon from '@material-ui/icons/Home';
|
||||
import RuleIcon from '@material-ui/icons/AssignmentTurnedIn';
|
||||
import MapIcon from '@material-ui/icons/MyLocation';
|
||||
|
||||
@@ -29,14 +29,12 @@ import {
|
||||
} from '@backstage/plugin-search-react';
|
||||
import { TechDocsSearchResultListItem } from '@backstage/plugin-techdocs';
|
||||
import { CatalogSearchResultListItem } from '@backstage/plugin-catalog';
|
||||
import {
|
||||
Box,
|
||||
DialogActions,
|
||||
DialogContent,
|
||||
DialogTitle,
|
||||
Grid,
|
||||
makeStyles,
|
||||
} from '@material-ui/core';
|
||||
import Box from '@material-ui/core/Box';
|
||||
import DialogActions from '@material-ui/core/DialogActions';
|
||||
import DialogContent from '@material-ui/core/DialogContent';
|
||||
import DialogTitle from '@material-ui/core/DialogTitle';
|
||||
import Grid from '@material-ui/core/Grid';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import Button from '@material-ui/core/Button';
|
||||
import IconButton from '@material-ui/core/IconButton';
|
||||
import ArrowForwardIcon from '@material-ui/icons/ArrowForward';
|
||||
|
||||
@@ -25,8 +25,8 @@ import {
|
||||
import { useApi } from '@backstage/core-plugin-api';
|
||||
import { CatalogSearchResultListItem } from '@backstage/plugin-catalog';
|
||||
import {
|
||||
catalogApiRef,
|
||||
CATALOG_FILTER_EXISTS,
|
||||
catalogApiRef,
|
||||
} from '@backstage/plugin-catalog-react';
|
||||
import { SearchType } from '@backstage/plugin-search';
|
||||
import {
|
||||
@@ -38,7 +38,10 @@ import {
|
||||
useSearch,
|
||||
} from '@backstage/plugin-search-react';
|
||||
import { TechDocsSearchResultListItem } from '@backstage/plugin-techdocs';
|
||||
import { Grid, makeStyles, Paper, Theme } from '@material-ui/core';
|
||||
import Paper from '@material-ui/core/Paper';
|
||||
import Grid from '@material-ui/core/Grid';
|
||||
import { Theme } from '@material-ui/core/styles/createTheme';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import React from 'react';
|
||||
|
||||
const useStyles = makeStyles((theme: Theme) => ({
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { makeStyles } from '@material-ui/core';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
|
||||
const useStyles = makeStyles({
|
||||
svg: {
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
|
||||
import React, { useState } from 'react';
|
||||
|
||||
import { Theme, makeStyles } from '@material-ui/core';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import { Theme } from '@material-ui/core/styles/createTheme';
|
||||
|
||||
import { Box, Tooltip, IconButton } from '@material-ui/core';
|
||||
import LightIcon from '@material-ui/icons/Brightness7';
|
||||
|
||||
@@ -12,9 +12,10 @@ import { ReactNode } from 'react';
|
||||
import { Theme } from '@mui/material/styles';
|
||||
import { Theme as Theme_2 } from '@material-ui/core/styles';
|
||||
import { Theme as Theme_3 } from '@material-ui/core';
|
||||
import type { Theme as Theme_4 } from '@material-ui/core/styles/createTheme';
|
||||
import { ThemeOptions } from '@mui/material/styles';
|
||||
import { ThemeOptions as ThemeOptions_2 } from '@material-ui/core/styles';
|
||||
import type { ThemeOptions as ThemeOptions_3 } from '@material-ui/core';
|
||||
import type { ThemeOptions as ThemeOptions_3 } from '@material-ui/core/styles/createTheme';
|
||||
import { UnifiedTheme as UnifiedTheme_2 } from '@backstage/theme';
|
||||
|
||||
// @public @deprecated
|
||||
@@ -91,7 +92,7 @@ export type BackstagePaletteOptions = PaletteOptions &
|
||||
BackstagePaletteAdditions;
|
||||
|
||||
// @public @deprecated
|
||||
export interface BackstageTheme extends Theme_3 {
|
||||
export interface BackstageTheme extends Theme_4 {
|
||||
// (undocumented)
|
||||
getPageTheme: (selector: PageThemeSelector) => PageTheme;
|
||||
// (undocumented)
|
||||
@@ -188,13 +189,13 @@ export function createBaseThemeOptions<PaletteOptions>(
|
||||
};
|
||||
|
||||
// @public @deprecated
|
||||
export function createTheme(options: SimpleThemeOptions): Theme_3;
|
||||
export function createTheme(options: SimpleThemeOptions): Theme_4;
|
||||
|
||||
// @public @deprecated
|
||||
export function createThemeOptions(options: SimpleThemeOptions): ThemeOptions_3;
|
||||
|
||||
// @public @deprecated
|
||||
export function createThemeOverrides(theme: Theme_3): Overrides;
|
||||
export function createThemeOverrides(theme: Theme_4): Overrides;
|
||||
|
||||
// @public
|
||||
export function createUnifiedTheme(options: UnifiedThemeOptions): UnifiedTheme;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import React, { ReactNode } from 'react';
|
||||
import { CssBaseline } from '@material-ui/core';
|
||||
import CssBaseline from '@material-ui/core/CssBaseline';
|
||||
import {
|
||||
ThemeProvider,
|
||||
StylesProvider,
|
||||
|
||||
@@ -16,12 +16,10 @@
|
||||
|
||||
import { Theme as Mui5Theme } from '@mui/material/styles';
|
||||
import { createTheme as createMuiTheme } from '@material-ui/core/styles';
|
||||
import type {
|
||||
GridProps,
|
||||
SwitchProps,
|
||||
Theme,
|
||||
ThemeOptions,
|
||||
} from '@material-ui/core';
|
||||
import type { Theme, ThemeOptions } from '@material-ui/core/styles/createTheme';
|
||||
import type { GridProps } from '@material-ui/core/Grid';
|
||||
import type { SwitchProps } from '@material-ui/core/Switch';
|
||||
|
||||
import { Overrides } from '@material-ui/core/styles/overrides';
|
||||
import { SimpleThemeOptions } from './types';
|
||||
import { createBaseThemeOptions } from '../base';
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
import type {
|
||||
Theme as MuiTheme,
|
||||
ThemeOptions as MuiThemeOptions,
|
||||
} from '@material-ui/core';
|
||||
} from '@material-ui/core/styles/createTheme';
|
||||
import type {
|
||||
PaletteOptions as MuiPaletteOptions,
|
||||
Palette as MuiPalette,
|
||||
|
||||
Reference in New Issue
Block a user