{children}
diff --git a/packages/core-components/src/layout/Sidebar/Items.tsx b/packages/core-components/src/layout/Sidebar/Items.tsx
index 9bccffc6c4..dbaa50b76e 100644
--- a/packages/core-components/src/layout/Sidebar/Items.tsx
+++ b/packages/core-components/src/layout/Sidebar/Items.tsx
@@ -290,3 +290,11 @@ export const SidebarDivider = styled('hr')({
border: 'none',
margin: '12px 0px',
});
+
+export const SidebarScrollWrapper = styled('div')({
+ flex: '0 1 auto',
+ overflowY: 'auto',
+ // Display at least one item in the container
+ // Question: Can this be a config/theme variable - if so, which? :/
+ minHeight: '48px',
+});
diff --git a/packages/core-components/src/layout/Sidebar/index.ts b/packages/core-components/src/layout/Sidebar/index.ts
index fc0e29f9a6..58e193dbaf 100644
--- a/packages/core-components/src/layout/Sidebar/index.ts
+++ b/packages/core-components/src/layout/Sidebar/index.ts
@@ -23,6 +23,7 @@ export {
SidebarSearchField,
SidebarSpace,
SidebarSpacer,
+ SidebarScrollWrapper,
} from './Items';
export { IntroCard, SidebarIntro } from './Intro';
export {
diff --git a/plugins/shortcuts/src/Shortcuts.tsx b/plugins/shortcuts/src/Shortcuts.tsx
index 775b0b3809..69ab6a48ac 100644
--- a/plugins/shortcuts/src/Shortcuts.tsx
+++ b/plugins/shortcuts/src/Shortcuts.tsx
@@ -16,24 +16,19 @@
import React, { useMemo } from 'react';
import { useObservable } from 'react-use';
-import { makeStyles } from '@material-ui/core';
import PlayListAddIcon from '@material-ui/icons/PlaylistAdd';
import { ShortcutItem } from './ShortcutItem';
import { AddShortcut } from './AddShortcut';
import { shortcutsApiRef } from './api';
-import { Progress, SidebarItem } from '@backstage/core-components';
+import {
+ Progress,
+ SidebarItem,
+ SidebarScrollWrapper,
+} from '@backstage/core-components';
import { useApi } from '@backstage/core-plugin-api';
-const useStyles = makeStyles({
- root: {
- flex: '1 1 auto',
- overflowY: 'scroll',
- },
-});
-
export const Shortcuts = () => {
- const classes = useStyles();
const shortcutApi = useApi(shortcutsApiRef);
const shortcuts = useObservable(
useMemo(() => shortcutApi.shortcut$(), [shortcutApi]),
@@ -50,7 +45,7 @@ export const Shortcuts = () => {
};
return (
-
+
{
/>
))
)}
-
+
);
};