remove even more BackstageTheme usages

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2023-11-20 15:52:05 +01:00
parent dd3517df31
commit 1d7c989db2
100 changed files with 206 additions and 253 deletions
@@ -16,7 +16,6 @@
import { ApiEntity } from '@backstage/catalog-model';
import { useApi } from '@backstage/core-plugin-api';
import { BackstageTheme } from '@backstage/theme';
import {
Box,
Button,
@@ -33,7 +32,7 @@ import React, { useEffect } from 'react';
import { apiDocsConfigRef } from '../../config';
import { PlainApiDefinitionWidget } from '../PlainApiDefinitionWidget';
const useStyles = makeStyles<BackstageTheme>(theme => ({
const useStyles = makeStyles(theme => ({
fullHeightDialog: {
height: 'calc(100% - 64px)',
},
@@ -14,7 +14,6 @@
* limitations under the License.
*/
import { BackstageTheme } from '@backstage/theme';
import { makeStyles } from '@material-ui/core/styles';
import {
DocExplorer,
@@ -26,7 +25,7 @@ import 'graphiql/graphiql.css';
import { buildSchema } from 'graphql';
import React from 'react';
const useStyles = makeStyles<BackstageTheme>(() => ({
const useStyles = makeStyles({
root: {
height: '100%',
display: 'flex',
@@ -46,7 +45,7 @@ const useStyles = makeStyles<BackstageTheme>(() => ({
},
},
},
}));
});
type Props = {
definition: string;
@@ -17,7 +17,6 @@
import React from 'react';
import { CodeSnippet } from '@backstage/core-components';
import { useTheme } from '@material-ui/core/styles';
import { BackstageTheme } from '@backstage/theme';
/** @public */
export type GrpcApiDefinitionWidgetProps = {
@@ -28,7 +27,7 @@ export type GrpcApiDefinitionWidgetProps = {
export const GrpcApiDefinitionWidget = (
props: GrpcApiDefinitionWidgetProps,
) => {
const theme = useTheme<BackstageTheme>();
const theme = useTheme();
return (
<CodeSnippet
customStyle={{ backgroundColor: theme.palette.background.default }}
@@ -16,7 +16,6 @@
import React from 'react';
import { CodeSnippet } from '@backstage/core-components';
import { useTheme } from '@material-ui/core/styles';
import { BackstageTheme } from '@backstage/theme';
/** @public */
export type TrpcApiDefinitionWidgetProps = {
@@ -28,7 +27,7 @@ export const TrpcApiDefinitionWidget = (
props: TrpcApiDefinitionWidgetProps,
) => {
const { definition } = props;
const theme = useTheme<BackstageTheme>();
const theme = useTheme();
return (
<CodeSnippet
customStyle={{ backgroundColor: theme.palette.background.default }}