1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-08 02:10:24 +00:00
Files
seahub/frontend/src/pages/lib-content-view/lib-content-toolbar.js
llj af3522d312 Dir view file view toolbar redesign (#6122)
* [dir view] redesigned the toolbar for 'view a markdown file'

* [dir view] markdown file view: don't use secondary dropdown menu for the toolbar
2024-05-28 18:17:53 +08:00

38 lines
1.1 KiB
JavaScript

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,
currentRepoInfo: PropTypes.object,
};
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}
repoID={this.props.repoID}
repoName={this.props.repoName}
currentRepoInfo={this.props.currentRepoInfo}
onSearchedClick={this.props.onSearchedClick}
searchPlaceholder={gettext('Search files')}
/>
</Fragment>
);
}
}
LibContentToolbar.propTypes = propTypes;
export default LibContentToolbar;