1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-02 07:27:04 +00:00
Files
seahub/frontend/src/components/toolbar/common-toolbar.js
shanshuirenjia ba583d6efd Draft dashboard optimized (#2384)
* create a common toolbar component

* optimized code

* combine side-panel

* add change state
2018-09-20 10:19:11 +08:00

26 lines
689 B
JavaScript

import React from 'react';
import PropTypes from 'prop-types';
import { isPro, gettext } from '../../components/constants';
import Search from '../search/search';
import Notification from '../common/notification';
import Account from '../common/account';
const propTypes = {
onSearchedClick: PropTypes.func.isRequired
};
class CommonToolbar extends React.Component {
render() {
return (
<div className="common-toolbar">
{isPro && <Search onSearchedClick={this.props.onSearchedClick} placeholder={gettext("Search files")}/>}
<Notification />
<Account />
</div>
);
}
}
CommonToolbar.propTypes = propTypes;
export default CommonToolbar;