-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor navigation sidebar directory structure
Because navigation panel and navigation toggle live outside the header and body, we place both components in their own navigation sidebar directory
- Loading branch information
Showing
16 changed files
with
33 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
packages/edit-site/src/components/navigation-sidebar/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** | ||
* Internal dependencies | ||
*/ | ||
import NavigationPanel from './navigation-panel'; | ||
import NavigationToggle from './navigation-toggle'; | ||
|
||
const NavigationSidebar = ( { content, isOpen, onNavigationToggle } ) => { | ||
return ( | ||
<> | ||
<NavigationToggle | ||
isOpen={ isOpen } | ||
onClick={ onNavigationToggle } | ||
/> | ||
{ content === 'navigation' && isOpen && <NavigationPanel /> } | ||
</> | ||
); | ||
}; | ||
|
||
export default NavigationSidebar; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.