Merge pull request #21425 from backstage/freben/themeee

remove even more BackstageTheme usages
This commit is contained in:
Patrik Oldsberg
2023-11-21 11:38:22 +01:00
committed by GitHub
100 changed files with 206 additions and 253 deletions
@@ -15,14 +15,13 @@
*/
import React from 'react';
import { makeStyles, useTheme } from '@material-ui/core';
import { Theme, makeStyles, useTheme } from '@material-ui/core';
import { ItemCardHeader } from '@backstage/core-components';
import { BackstageTheme } from '@backstage/theme';
import { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';
import { FavoriteEntity } from '@backstage/plugin-catalog-react';
const useStyles = makeStyles<
BackstageTheme,
Theme,
{
cardFontColor: string;
cardBackgroundImage: string;
@@ -55,7 +54,7 @@ export const CardHeader = (props: CardHeaderProps) => {
spec: { type },
},
} = props;
const { getPageTheme } = useTheme<BackstageTheme>();
const { getPageTheme } = useTheme();
const themeForType = getPageTheme({ themeId: type });
const styles = useStyles({
@@ -13,8 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { IconComponent } from '@backstage/core-plugin-api';
import { BackstageTheme } from '@backstage/theme';
import { Link } from '@backstage/core-components';
import { makeStyles } from '@material-ui/core';
import React from 'react';
@@ -25,7 +25,7 @@ interface CardLinkProps {
url: string;
}
const useStyles = makeStyles<BackstageTheme>(() => ({
const useStyles = makeStyles(() => ({
linkText: {
display: 'inline-flex',
alignItems: 'center',
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { RELATION_OWNED_BY } from '@backstage/catalog-model';
import { MarkdownContent, UserIcon } from '@backstage/core-components';
import { IconComponent, useApp } from '@backstage/core-plugin-api';
@@ -21,7 +22,6 @@ import {
getEntityRelations,
} from '@backstage/plugin-catalog-react';
import { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';
import { BackstageTheme } from '@backstage/theme';
import {
Box,
Card,
@@ -32,13 +32,14 @@ import {
Button,
Grid,
makeStyles,
Theme,
} from '@material-ui/core';
import LanguageIcon from '@material-ui/icons/Language';
import React from 'react';
import { CardHeader } from './CardHeader';
import { CardLink } from './CardLink';
const useStyles = makeStyles<BackstageTheme>(theme => ({
const useStyles = makeStyles<Theme>(theme => ({
box: {
overflow: 'hidden',
textOverflow: 'ellipsis',
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React, { useEffect } from 'react';
import {
Content,
@@ -22,16 +23,14 @@ import {
} from '@backstage/core-components';
import { stringifyEntityRef } from '@backstage/catalog-model';
import { makeStyles } from '@material-ui/core';
import { BackstageTheme } from '@backstage/theme';
import { errorApiRef, useApi } from '@backstage/core-plugin-api';
import { useTemplateParameterSchema } from '../../hooks/useTemplateParameterSchema';
import { Stepper, type StepperProps } from '../Stepper/Stepper';
import { SecretsContextProvider } from '../../../secrets/SecretsContext';
import { useFilteredSchemaProperties } from '../../hooks/useFilteredSchemaProperties';
import { ReviewStepProps } from '@backstage/plugin-scaffolder-react';
const useStyles = makeStyles<BackstageTheme>(() => ({
const useStyles = makeStyles({
markdown: {
/** to make the styles for React Markdown not leak into the description */
'& :first-child': {
@@ -41,7 +40,7 @@ const useStyles = makeStyles<BackstageTheme>(() => ({
marginBottom: 0,
},
},
}));
});
/**
* @alpha