Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1dc8d6d
commit ea3d5b7
Showing
19 changed files
with
391 additions
and
279 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
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
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
95 changes: 0 additions & 95 deletions
95
packages/edit-site/src/components/header/navigation-link/index.js
This file was deleted.
Oops, something went wrong.
69 changes: 0 additions & 69 deletions
69
packages/edit-site/src/components/header/navigation-link/style.scss
This file was deleted.
Oops, something went wrong.
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,32 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { useSelect } from '@wordpress/data'; | ||
import { store as coreStore } from '@wordpress/core-data'; | ||
import { | ||
__experimentalHeading as Heading, | ||
Button, | ||
} from '@wordpress/components'; | ||
|
||
export default function Header( { templateType } ) { | ||
const postType = useSelect( | ||
( select ) => select( coreStore ).getPostType( templateType ), | ||
[ templateType ] | ||
); | ||
|
||
if ( ! postType ) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<header className="edit-site-list-header"> | ||
<Heading level={ 1 } className="edit-site-list-header__title"> | ||
{ postType.labels?.name } | ||
</Heading> | ||
|
||
<div> | ||
<Button variant="primary">{ postType.labels?.add_new }</Button> | ||
</div> | ||
</header> | ||
); | ||
} |
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,39 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { InterfaceSkeleton, FullscreenMode } from '@wordpress/interface'; | ||
import { __ } from '@wordpress/i18n'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import Header from './header'; | ||
import NavigationSidebar from '../navigation-sidebar'; | ||
import Table from './table'; | ||
|
||
export default function List( { templateType } ) { | ||
return ( | ||
<> | ||
<FullscreenMode isActive /> | ||
|
||
<InterfaceSkeleton | ||
className="edit-site-list" | ||
labels={ { | ||
drawer: __( 'Navigation Sidebar' ), | ||
} } | ||
header={ <Header templateType={ templateType } /> } | ||
drawer={ | ||
<NavigationSidebar | ||
defaultIsOpen | ||
activeTemplateType={ templateType } | ||
/> | ||
} | ||
content={ | ||
<main className="edit-site-list-main"> | ||
<Table templateType={ templateType } /> | ||
</main> | ||
} | ||
/> | ||
</> | ||
); | ||
} |
Oops, something went wrong.