remove layoutProvider references
Signed-off-by: Juan Pablo Garcia Ripa <sarabadu@gmail.com>
This commit is contained in:
@@ -2,4 +2,4 @@
|
||||
'@backstage/core-components': patch
|
||||
---
|
||||
|
||||
Add `LayoutProvider` component and `useLayoutContent` hook to have a reference to current main content element
|
||||
Add `useContent` hook to have a reference to the current main content element
|
||||
|
||||
@@ -30,7 +30,6 @@ import { createApp } from '@backstage/app-defaults';
|
||||
import { FlatRoutes } from '@backstage/core-app-api';
|
||||
import {
|
||||
AlertDisplay,
|
||||
LayoutProvider,
|
||||
OAuthRequestDialog,
|
||||
SignInPage,
|
||||
} from '@backstage/core-components';
|
||||
@@ -226,13 +225,11 @@ const routes = (
|
||||
|
||||
const App = () => (
|
||||
<AppProvider>
|
||||
<LayoutProvider>
|
||||
<AlertDisplay />
|
||||
<OAuthRequestDialog />
|
||||
<AppRouter>
|
||||
<Root>{routes}</Root>
|
||||
</AppRouter>
|
||||
</LayoutProvider>
|
||||
<AlertDisplay />
|
||||
<OAuthRequestDialog />
|
||||
<AppRouter>
|
||||
<Root>{routes}</Root>
|
||||
</AppRouter>
|
||||
</AppProvider>
|
||||
);
|
||||
|
||||
|
||||
@@ -571,11 +571,6 @@ enum LabelPosition {
|
||||
RIGHT = 'r',
|
||||
}
|
||||
|
||||
// Warning: (ae-missing-release-tag) "LayoutProvider" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export function LayoutProvider(props: PropsWithChildren<{}>): JSX.Element;
|
||||
|
||||
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
|
||||
// Warning: (ae-missing-release-tag) "Lifecycle" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
@@ -2406,10 +2401,10 @@ export function TrendLine(
|
||||
},
|
||||
): JSX.Element | null;
|
||||
|
||||
// Warning: (ae-missing-release-tag) "useLayoutContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
// Warning: (ae-missing-release-tag) "useContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export function useLayoutContent(): {
|
||||
export function useContent(): {
|
||||
focusContent: () => void;
|
||||
contentRef: React_2.MutableRefObject<HTMLDivElement | null> | undefined;
|
||||
};
|
||||
|
||||
@@ -23,11 +23,10 @@ import Button from '@material-ui/core/Button';
|
||||
|
||||
import { sidebarConfig, SidebarContext } from './config';
|
||||
import { BackstageTheme } from '@backstage/theme';
|
||||
import { SidebarPinStateContext } from './Page';
|
||||
import { SidebarPinStateContext, useContent } from './Page';
|
||||
import { MobileSidebar } from './MobileSidebar';
|
||||
import DoubleArrowRight from './icons/DoubleArrowRight';
|
||||
import DoubleArrowLeft from './icons/DoubleArrowLeft';
|
||||
import { useLayoutContent } from '../LayoutProvider/LayoutProvider';
|
||||
|
||||
/** @public */
|
||||
export type SidebarClassKey = 'drawer' | 'drawerOpen';
|
||||
@@ -230,7 +229,7 @@ export const Sidebar = (props: SidebarProps) => {
|
||||
};
|
||||
|
||||
function A11ySkipSidebar() {
|
||||
const { focusContent, contentRef } = useLayoutContent();
|
||||
const { focusContent, contentRef } = useContent();
|
||||
const classes = useStyles();
|
||||
|
||||
if (!contentRef?.current) {
|
||||
|
||||
@@ -31,4 +31,3 @@ export * from './Sidebar';
|
||||
export * from './SignInPage';
|
||||
export * from './TabbedCard';
|
||||
export * from './Breadcrumbs';
|
||||
export * from './LayoutProvider';
|
||||
|
||||
Reference in New Issue
Block a user