diff --git a/workspaces/topology/packages/app/src/App.tsx b/workspaces/topology/packages/app/src/App.tsx index 6fa4109964..8ba7b7fde7 100644 --- a/workspaces/topology/packages/app/src/App.tsx +++ b/workspaces/topology/packages/app/src/App.tsx @@ -40,8 +40,6 @@ import { apis } from './apis'; import { entityPage } from './components/catalog/EntityPage'; import { searchPage } from './components/search/SearchPage'; import { Root } from './components/Root'; -// import { getThemes } from '@redhat-developer/red-hat-developer-hub-theme'; -import { StyledEngineProvider } from '@mui/material/styles'; import { AlertDisplay, @@ -53,6 +51,10 @@ import { AppRouter, FlatRoutes } from '@backstage/core-app-api'; import { CatalogGraphPage } from '@backstage/plugin-catalog-graph'; import { RequirePermission } from '@backstage/plugin-permission-react'; import { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common/alpha'; +import { + UnifiedThemeProvider, + themes as builtinThemes, +} from '@backstage/theme'; const app = createApp({ apis, @@ -76,7 +78,24 @@ const app = createApp({ components: { SignInPage: props => , }, - // themes: getThemes(), + themes: [ + { + Provider: ({ children }) => ( + + ), + id: 'light', + title: 'Backstage Light', + variant: 'light', + }, + { + Provider: ({ children }) => ( + + ), + id: 'dark', + title: 'Backstage Dark', + variant: 'dark', + }, + ], }); const routes = ( @@ -120,10 +139,8 @@ export default app.createRoot( <> - - - {routes} - - + + {routes} + , ); diff --git a/workspaces/topology/packages/app/src/components/Root/Root.tsx b/workspaces/topology/packages/app/src/components/Root/Root.tsx index 3786040198..2133aa7f75 100644 --- a/workspaces/topology/packages/app/src/components/Root/Root.tsx +++ b/workspaces/topology/packages/app/src/components/Root/Root.tsx @@ -44,7 +44,6 @@ import { MyGroupsSidebarItem } from '@backstage/plugin-org'; import GroupIcon from '@mui/icons-material/People'; import { ThemeProvider, useTheme } from '@mui/material/styles'; -import { IconComponent } from '@backstage/core-plugin-api'; const useSidebarLogoStyles = makeStyles({ root: { @@ -87,28 +86,16 @@ export const Root = ({ children }: PropsWithChildren<{}>) => { }> {/* Global nav, not org-specific */} - + - - + + diff --git a/workspaces/topology/packages/app/src/components/catalog/EntityPage.tsx b/workspaces/topology/packages/app/src/components/catalog/EntityPage.tsx index 846ec6fb13..9096ced0fb 100644 --- a/workspaces/topology/packages/app/src/components/catalog/EntityPage.tsx +++ b/workspaces/topology/packages/app/src/components/catalog/EntityPage.tsx @@ -15,7 +15,7 @@ */ import React from 'react'; import Button from '@mui/material/Button'; -import Grid from '@mui/material/Unstable_Grid2'; +import Grid from '@mui/material/Grid'; import { EntityApiDefinitionCard, diff --git a/workspaces/topology/packages/app/src/components/search/SearchPage.tsx b/workspaces/topology/packages/app/src/components/search/SearchPage.tsx index 4b8172bccf..fe9c50653c 100644 --- a/workspaces/topology/packages/app/src/components/search/SearchPage.tsx +++ b/workspaces/topology/packages/app/src/components/search/SearchPage.tsx @@ -16,7 +16,7 @@ import React from 'react'; import { Theme } from '@mui/material/styles'; import Paper from '@mui/material/Paper'; -import Grid from '@mui/material/Unstable_Grid2'; +import Grid from '@mui/material/Grid'; import { makeStyles } from '@mui/styles'; import { CatalogSearchResultListItem } from '@backstage/plugin-catalog';