@@ -23,21 +23,41 @@ import {
2323} from '@backstage/core-components' ;
2424import { NavContentBlueprint } from '@backstage/plugin-app-react' ;
2525import { SidebarLogo } from './SidebarLogo' ;
26+ import { useAppDrawer } from '@red-hat-developer-hub/backstage-plugin-app-react' ;
2627import MenuIcon from '@material-ui/icons/Menu' ;
2728import SearchIcon from '@material-ui/icons/Search' ;
29+ import ChatIcon from '@material-ui/icons/Chat' ;
30+ import HelpIcon from '@material-ui/icons/Help' ;
2831import { SidebarSearchModal } from '@backstage/plugin-search' ;
2932import { UserSettingsSignInAvatar } from '@backstage/plugin-user-settings' ;
3033import { NotificationsSidebarItem } from '@backstage/plugin-notifications' ;
3134
35+ const DrawerDemoItems = ( ) => {
36+ const { toggleDrawer } = useAppDrawer ( ) ;
37+ return (
38+ < >
39+ < SidebarItem
40+ icon = { ( ) => < ChatIcon /> }
41+ text = "Chat"
42+ onClick = { ( ) => toggleDrawer ( 'demo-chat' ) }
43+ />
44+ < SidebarItem
45+ icon = { ( ) => < HelpIcon /> }
46+ text = "Help"
47+ onClick = { ( ) => toggleDrawer ( 'demo-help' ) }
48+ />
49+ </ >
50+ ) ;
51+ } ;
52+
3253export const SidebarContent = NavContentBlueprint . make ( {
3354 params : {
3455 component : ( { navItems } ) => {
3556 const nav = navItems . withComponent ( item => (
3657 < SidebarItem icon = { ( ) => item . icon } to = { item . href } text = { item . title } />
3758 ) ) ;
3859
39- // Skipped items
40- nav . take ( 'page:search' ) ; // Using search modal instead
60+ nav . take ( 'page:search' ) ;
4161
4262 return (
4363 < Sidebar >
@@ -56,6 +76,7 @@ export const SidebarContent = NavContentBlueprint.make({
5676 </ SidebarGroup >
5777 < SidebarSpace />
5878 < SidebarDivider />
79+ < DrawerDemoItems />
5980 < NotificationsSidebarItem />
6081 < SidebarDivider />
6182 < SidebarGroup
0 commit comments