remove even more BackstageTheme usages
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -18,7 +18,6 @@ import { useCallback, useEffect, useState } from 'react';
|
||||
|
||||
import { useTheme, useMediaQuery } from '@material-ui/core';
|
||||
|
||||
import { BackstageTheme } from '@backstage/theme';
|
||||
import { CompoundEntityRef } from '@backstage/catalog-model';
|
||||
import { useAnalytics, useApi } from '@backstage/core-plugin-api';
|
||||
import { scmIntegrationsApiRef } from '@backstage/integration-react';
|
||||
@@ -58,7 +57,7 @@ export const useTechDocsReaderDom = (
|
||||
entityRef: CompoundEntityRef,
|
||||
): Element | null => {
|
||||
const navigate = useNavigateUrl();
|
||||
const theme = useTheme<BackstageTheme>();
|
||||
const theme = useTheme();
|
||||
const isMobileMedia = useMediaQuery(MOBILE_MEDIA_QUERY);
|
||||
const sanitizerTransformer = useSanitizerTransformer();
|
||||
const stylesTransformer = useStylesTransformer();
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { BackstageTheme } from '@backstage/theme';
|
||||
import { Theme } from '@material-ui/core';
|
||||
|
||||
/**
|
||||
* A Backstage sidebar object that contains properties such as its pin state.
|
||||
@@ -31,7 +31,7 @@ export type RuleOptions = {
|
||||
/**
|
||||
* A Backstage theme object that contains the application's design tokens.
|
||||
*/
|
||||
theme: BackstageTheme;
|
||||
theme: Theme;
|
||||
/**
|
||||
* A Backstage sidebar, see {@link BackstageSidebar} for more details.
|
||||
*/
|
||||
|
||||
@@ -15,12 +15,8 @@
|
||||
*/
|
||||
|
||||
import { useCallback, useMemo } from 'react';
|
||||
|
||||
import { useTheme } from '@material-ui/core';
|
||||
|
||||
import { useSidebarPinState } from '@backstage/core-components';
|
||||
import { BackstageTheme } from '@backstage/theme';
|
||||
|
||||
import { Transformer } from '../transformer';
|
||||
import { rules } from './rules';
|
||||
|
||||
@@ -35,7 +31,7 @@ const useSidebar = () => useSidebarPinState();
|
||||
*/
|
||||
const useRuleStyles = () => {
|
||||
const sidebar = useSidebar();
|
||||
const theme = useTheme<BackstageTheme>();
|
||||
const theme = useTheme();
|
||||
|
||||
return useMemo(() => {
|
||||
const options = { theme, sidebar };
|
||||
|
||||
Reference in New Issue
Block a user