1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-02 15:38:15 +00:00
Files
seahub/frontend/src/components/toolbar/general-toolbar.js

37 lines
944 B
JavaScript
Raw Normal View History

import React from 'react';
2018-11-26 14:00:32 +08:00
import PropTypes from 'prop-types';
import CommonToolbar from './common-toolbar';
const propTypes = {
searchPlaceholder: PropTypes.string,
2018-11-26 14:00:32 +08:00
onShowSidePanel: PropTypes.func.isRequired,
onSearchedClick: PropTypes.func.isRequired,
};
class GeneralToolbar extends React.Component {
render() {
2018-11-28 12:41:49 +08:00
// todo get repoID?
2018-11-26 14:00:32 +08:00
let { onShowSidePanel, onSearchedClick } = this.props;
return (
2018-11-26 17:53:18 +08:00
<div className="main-panel-north">
2018-11-26 14:00:32 +08:00
<div className="cur-view-toolbar">
<span
className="sf2-icon-menu side-nav-toggle hidden-md-up d-md-none"
title="Side Nav Menu"
onClick={onShowSidePanel}>
</span>
</div>
<CommonToolbar
2018-12-13 15:48:42 +08:00
searchPlaceholder={this.props.searchPlaceholder}
2018-11-26 14:00:32 +08:00
onSearchedClick={onSearchedClick}
/>
2018-11-26 17:53:18 +08:00
</div>
2018-11-26 14:00:32 +08:00
);
}
}
GeneralToolbar.propTypes = propTypes;
export default GeneralToolbar;