1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-08 10:22:46 +00:00
Files
seahub/frontend/src/pages/lib-content-view/lib-content-toolbar.js

41 lines
1.2 KiB
JavaScript
Raw Normal View History

import React, { Fragment } from 'react';
import PropTypes from 'prop-types';
import { gettext } from '../../utils/constants';
import CommonToolbar from '../../components/toolbar/common-toolbar';
const propTypes = {
onSideNavMenuClick: PropTypes.func.isRequired,
repoID: PropTypes.string.isRequired,
repoName: PropTypes.string.isRequired,
onSearchedClick: PropTypes.func.isRequired,
2019-05-30 14:13:23 +08:00
currentRepoInfo: PropTypes.object,
path: PropTypes.string,
isViewFile: PropTypes.bool,
};
class LibContentToolbar extends React.Component {
render() {
return (
<Fragment>
<div className="cur-view-toolbar">
<span className="sf2-icon-menu hidden-md-up d-md-none side-nav-toggle" title={gettext('Side Nav Menu')} onClick={this.props.onSideNavMenuClick}></span>
</div>
<CommonToolbar
isLibView={true}
path={this.props.path}
isViewFile={this.props.isViewFile}
repoID={this.props.repoID}
repoName={this.props.repoName}
currentRepoInfo={this.props.currentRepoInfo}
onSearchedClick={this.props.onSearchedClick}
/>
</Fragment>
);
}
}
LibContentToolbar.propTypes = propTypes;
export default LibContentToolbar;