chore(material-ui): Remove more top-level @material-ui imports
Signed-off-by: Łukasz Jernaś <lukasz.jernas@allegro.com>
This commit is contained in:
@@ -1 +1,5 @@
|
||||
module.exports = require('@backstage/cli/config/eslint-factory')(__dirname);
|
||||
module.exports = require('@backstage/cli/config/eslint-factory')(__dirname, {
|
||||
rules: {
|
||||
'@backstage/no-top-level-material-ui-4-imports': 'error',
|
||||
},
|
||||
});
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
// NOTE: This file is intentionally .jsx, so that there is one file in this repo where we make sure .jsx files work.
|
||||
|
||||
import React from 'react';
|
||||
import { makeStyles } from '@material-ui/core';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
|
||||
const useStyles = makeStyles({
|
||||
svg: {
|
||||
|
||||
@@ -16,14 +16,12 @@
|
||||
|
||||
import React from 'react';
|
||||
import { InfoCard } from '@backstage/core-components';
|
||||
import {
|
||||
List,
|
||||
Grid,
|
||||
ListItem,
|
||||
ListItemText,
|
||||
ListItemSecondaryAction,
|
||||
Switch,
|
||||
} from '@material-ui/core';
|
||||
import List from '@material-ui/core/List';
|
||||
import Grid from '@material-ui/core/Grid';
|
||||
import ListItem from '@material-ui/core/ListItem';
|
||||
import ListItemText from '@material-ui/core/ListItemText';
|
||||
import ListItemSecondaryAction from '@material-ui/core/ListItemSecondaryAction';
|
||||
import Switch from '@material-ui/core/Switch';
|
||||
import useLocalStorage from 'react-use/esm/useLocalStorage';
|
||||
|
||||
export function AdvancedSettings() {
|
||||
|
||||
@@ -70,7 +70,8 @@ import {
|
||||
EntityOwnershipCard,
|
||||
EntityUserProfileCard,
|
||||
} from '@backstage/plugin-org';
|
||||
import { Button, Grid } from '@material-ui/core';
|
||||
import Button from '@material-ui/core/Button';
|
||||
import Grid from '@material-ui/core/Grid';
|
||||
import React, { ReactNode } from 'react';
|
||||
import { TechDocsAddons } from '@backstage/plugin-techdocs-react';
|
||||
import {
|
||||
|
||||
@@ -37,7 +37,8 @@ import {
|
||||
searchApiRef,
|
||||
SearchContextProvider,
|
||||
} from '@backstage/plugin-search-react';
|
||||
import { Grid, makeStyles } from '@material-ui/core';
|
||||
import Grid from '@material-ui/core/Grid';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import React, { ComponentType, PropsWithChildren } from 'react';
|
||||
|
||||
const entities = [
|
||||
@@ -126,8 +127,8 @@ const useStyles = makeStyles(theme => ({
|
||||
boxShadow: theme.shadows[1],
|
||||
},
|
||||
searchBarOutline: {
|
||||
borderStyle: 'none'
|
||||
}
|
||||
borderStyle: 'none',
|
||||
},
|
||||
}));
|
||||
|
||||
const useLogoStyles = makeStyles(theme => ({
|
||||
@@ -156,9 +157,14 @@ export const DefaultTemplate = () => {
|
||||
className={container}
|
||||
logo={<TemplateBackstageLogo classes={{ svg, path }} />}
|
||||
/>
|
||||
<Grid container item xs={12} justifyContent='center'>
|
||||
<Grid container item xs={12} justifyContent="center">
|
||||
<HomePageSearchBar
|
||||
InputProps={{ classes: { root: classes.searchBarInput, notchedOutline: classes.searchBarOutline }}}
|
||||
InputProps={{
|
||||
classes: {
|
||||
root: classes.searchBarInput,
|
||||
notchedOutline: classes.searchBarOutline,
|
||||
},
|
||||
}}
|
||||
placeholder="Search"
|
||||
/>
|
||||
</Grid>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
import React from 'react';
|
||||
import type { FieldValidation } from '@rjsf/utils';
|
||||
import { scaffolderPlugin } from '@backstage/plugin-scaffolder';
|
||||
import { TextField } from '@material-ui/core';
|
||||
import TextField from '@material-ui/core/TextField';
|
||||
import {
|
||||
createScaffolderFieldExtension,
|
||||
FieldExtensionComponentProps,
|
||||
|
||||
@@ -19,7 +19,7 @@ import {
|
||||
LayoutTemplate,
|
||||
scaffolderPlugin,
|
||||
} from '@backstage/plugin-scaffolder';
|
||||
import { Grid } from '@material-ui/core';
|
||||
import Grid from '@material-ui/core/Grid';
|
||||
|
||||
const TwoColumn: LayoutTemplate = ({ properties, description, title }) => {
|
||||
const mid = Math.ceil(properties.length / 2);
|
||||
|
||||
@@ -1 +1,5 @@
|
||||
module.exports = require('@backstage/cli/config/eslint-factory')(__dirname);
|
||||
module.exports = require('@backstage/cli/config/eslint-factory')(__dirname, {
|
||||
rules: {
|
||||
'@backstage/no-top-level-material-ui-4-imports': 'error',
|
||||
},
|
||||
});
|
||||
|
||||
@@ -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,7 @@
|
||||
|
||||
import React, { PropsWithChildren } from 'react';
|
||||
|
||||
import { makeStyles } from '@material-ui/core';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import LibraryBooks from '@material-ui/icons/LibraryBooks';
|
||||
import LogoFull from './LogoFull';
|
||||
import LogoIcon from './LogoIcon';
|
||||
|
||||
@@ -19,7 +19,9 @@ import React, { useState } from 'react';
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
import { Theme } from '@material-ui/core/styles/createTheme';
|
||||
|
||||
import { Box, Tooltip, IconButton } from '@material-ui/core';
|
||||
import Box from '@material-ui/core/Box';
|
||||
import Tooltip from '@material-ui/core/Tooltip';
|
||||
import IconButton from '@material-ui/core/IconButton';
|
||||
import LightIcon from '@material-ui/icons/Brightness7';
|
||||
import DarkIcon from '@material-ui/icons/Brightness4';
|
||||
|
||||
|
||||
@@ -1 +1,5 @@
|
||||
module.exports = require('@backstage/cli/config/eslint-factory')(__dirname);
|
||||
module.exports = require('@backstage/cli/config/eslint-factory')(__dirname, {
|
||||
rules: {
|
||||
'@backstage/no-top-level-material-ui-4-imports': 'error',
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user