|
123456789101112131415161718192021222324252627282930 |
- import { h, Component } from 'preact';
- import WBNavbar from 'wb-navbar';
- import WBInlineSearch from 'wb-inline-search';
-
- class WBNavbarCommon extends Component {
- render({ app, items, activeItem, textSearch, textSearchNavigate }) {
- return (
- <WBNavbar
- items={ [
- { 'name': 'Home', 'id': 'home' },
- { 'name': 'All Projects', 'id': 'all-projects' },
- { 'name': 'All Users', 'id': 'all-users' },
- { 'name': 'Shared with Me', 'id': 'shared-with-me' },
- { 'name': 'Current User', 'dropdown': [ { 'id': 'sign-out', 'name': 'Sign Out' } ]}
- ].concat(items) }
- rhs={ textSearchNavigate ? (
- <WBInlineSearch textSearch={ textSearch } navigate={ textSearchNavigate } />
- ) : null }
- titleUrl = { '/browse/' + app.state.currentUser.uuid }
- getItemUrl={ item => app.navbarItemUrl(item) }
- activeItem={ activeItem } />
- );
- }
- }
-
- WBNavbarCommon.defaultProps = {
- 'items': []
- };
-
- export default WBNavbarCommon;
|