Skip to content

Commit

Permalink
Navigation Screen: Hide sidebar menu isn't selected
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka committed May 21, 2021
1 parent db0d8c2 commit b57d7f1
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions packages/edit-navigation/src/components/layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,23 +186,25 @@ export default function Layout( { blockEditorSettings } ) {
)
}
/>
<Sidebar
onSelectMenu={ selectMenu }
menus={ menus }
menuId={ selectedMenuId }
onDeleteMenu={ deleteMenu }
isMenuBeingDeleted={ isMenuBeingDeleted }
hasPermanentSidebar={ hasPermanentSidebar }
isManageLocationsModalOpen={
isManageLocationsModalOpen
}
openManageLocationsModal={
openManageLocationsModal
}
closeManageLocationsModal={
closeManageLocationsModal
}
/>
{ isMenuSelected && (
<Sidebar
onSelectMenu={ selectMenu }
menus={ menus }
menuId={ selectedMenuId }
onDeleteMenu={ deleteMenu }
isMenuBeingDeleted={ isMenuBeingDeleted }
hasPermanentSidebar={ hasPermanentSidebar }
isManageLocationsModalOpen={
isManageLocationsModalOpen
}
openManageLocationsModal={
openManageLocationsModal
}
closeManageLocationsModal={
closeManageLocationsModal
}
/>
) }
</IsMenuNameControlFocusedContext.Provider>
<UnsavedChangesWarning />
</BlockEditorProvider>
Expand Down

0 comments on commit b57d7f1

Please sign in to comment.