1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-05 08:53:14 +00:00

Draft dashboard optimized (#2384)

* create a common toolbar component

* optimized code

* combine side-panel

* add change state
This commit is contained in:
shanshuirenjia
2018-09-19 21:19:11 -05:00
committed by Daniel Pan
parent 7a17e908b0
commit ba583d6efd
22 changed files with 278 additions and 211 deletions

View File

@@ -0,0 +1,26 @@
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;